]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
Improved use of gcc __attribute__.
authorNiels Möller <nisse@lysator.liu.se>
Fri, 7 Sep 2012 19:01:46 +0000 (21:01 +0200)
committerNiels Möller <nisse@lysator.liu.se>
Fri, 7 Sep 2012 19:01:46 +0000 (21:01 +0200)
ChangeLog
examples/io.h
examples/nettle-benchmark.c
tools/misc.h

index 451f4b3ca8b475f9f204c43eda7fd51dfc93e2ac..cf5aa1c355849232461cff40d0cb6a4bf61ae22d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2012-09-07  Niels Möller  <nisse@lysator.liu.se>
+
+       * examples/nettle-benchmark.c (die): Add NORETURN attribute. Patch
+       from Tim Rühsen.
+       * tools/misc.h (die, werror): Use PRINTF_STYLE and NORETURN macros
+       for attributes. Patch from Tim Rühsen.
+
+       * examples/io.h (werror): Use PRINTF_STYLE macro.
+
 2012-08-22  Niels Möller  <nisse@lysator.liu.se>
 
        From Sam Thursfield <sam.thursfield@codethink.co.uk>:
index ff4a18dc918ea3084cf0aa8bd52642fbb6f3b21e..d95c81a3e2262660f79be10880a57394276fdd6e 100644 (file)
@@ -37,11 +37,7 @@ void *
 xalloc(size_t size);
 
 void
-werror(const char *format, ...)
-#if __GNUC___
-     __attribute__((__format__ (__printf__,1, 2)))
-#endif
-     ;
+werror(const char *format, ...) PRINTF_STYLE(1, 2);
 
 /* If size is > 0, read at most that many bytes. If size == 0,
  * read until EOF. Allocates the buffer dynamically. */
index b76a91cbbf63d3b966c1d559ab42d801b5829ded..48e53d06b2c8ede7077db74581806b4804d34684 100644 (file)
@@ -96,7 +96,7 @@ static double frequency = 0.0;
 #define BENCH_ITERATIONS 10
 #endif
 
-static void
+static void NORETURN
 die(const char *format, ...)
 {
   va_list args;
index 70c9eeb116ecd789b4be2ea6f82d01fcb7fea8be..df2bed17ad9f750046f16a36b640db2a50826993 100644 (file)
 #endif
 
 void
-die(const char *format, ...)
-#if __GNUC___
-     __attribute__((__format__ (__printf__,1, 2)))
-     __attribute__((__noreturn__))
-#endif
-     ;
+die(const char *format, ...) PRINTF_STYLE (1, 2) NORETURN;
 
 void
-werror(const char *format, ...)
-#if __GNUC___
-     __attribute__((__format__ (__printf__,1, 2)))
-#endif
-     ;
+werror(const char *format, ...) PRINTF_STYLE (1, 2);
 
 void *
 xalloc(size_t size);