[PATCH 3/6] hwclock: fix warning [-Winvalid-noreturn]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ruediger Meier <ruediger.meier@xxxxxxxxxxx>

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@xxxxxxxxxxx>
---
 sys-utils/hwclock.c | 2 +-
 sys-utils/hwclock.h | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c
index 603146079..cfb6bcd6b 100644
--- a/sys-utils/hwclock.c
+++ b/sys-utils/hwclock.c
@@ -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__))
diff --git a/sys-utils/hwclock.h b/sys-utils/hwclock.h
index f3f76a6da..d527fe310 100644
--- a/sys-utils/hwclock.h
+++ b/sys-utils/hwclock.h
@@ -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 */
-- 
2.12.3

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux