]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
hwclock: fix warning [-Winvalid-noreturn]
authorRuediger Meier <ruediger.meier@ga-group.nl>
Sun, 11 Jun 2017 20:00:49 +0000 (22:00 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 14 Jun 2017 09:48:22 +0000 (11:48 +0200)
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>
sys-utils/hwclock.c
sys-utils/hwclock.h

index 6031460796dbc5f20c0f2ce2c59fa461af51213f..cfb6bcd6b5079c75f228cdf4164e4581f9b4d23f 100644 (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__))
index f3f76a6dac7f7ab43a0e3ef0f7d943d9f5f05a16..d527fe31085a1a3323613d30fab2cbb05b2f3ed4 100644 (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 */