hwclock: fix warning [-Winvalid-noreturn]

clang warned:

 CC       sys-utils/hwclock.o
../sys-utils/hwclock.c:1274:1: warning: function declared 'noreturn' should not return [-Winvalid-noreturn]

We have to move the noreturn attribute from the function definition
to the declaration.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
This commit is contained in:
Ruediger Meier 2017-06-11 22:00:49 +02:00 committed by Karel Zak
parent b68d953e62
commit 39ff5b34d3
2 changed files with 3 additions and 2 deletions

View File

@ -1535,7 +1535,7 @@ int main(int argc, char **argv)
return rc; /* Not reached */
}
void __attribute__((__noreturn__))
void
hwclock_exit(const struct hwclock_control *ctl
#ifndef HAVE_LIBAUDIT
__attribute__((__unused__))

View File

@ -73,6 +73,7 @@ extern int get_epoch_rtc(const struct hwclock_control *ctl, unsigned long *epoch
extern int set_epoch_rtc(const struct hwclock_control *ctl);
#endif
extern void hwclock_exit(const struct hwclock_control *ctl, int status);
extern void __attribute__((__noreturn__))
hwclock_exit(const struct hwclock_control *ctl, int status);
#endif /* HWCLOCK_CLOCK_H */