summaryrefslogtreecommitdiff
path: root/gl/lib/randread.c
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2009-04-06 12:23:26 +0100
committerPádraig Brady <P@draigBrady.com>2009-04-07 19:08:32 +0100
commit0f1b8c021d23d19f7c91738c6252558f8252f875 (patch)
tree39ad96bf82caa208c6a7be1d47e348155d6f1670 /gl/lib/randread.c
parentaf5723c71e3efbfe60266162ebb5d07b45d72725 (diff)
downloadcoreutils-0f1b8c021d23d19f7c91738c6252558f8252f875.tar.xz
maint: remove compiler warnings from randint and randread modules
* gl/lib/randint.c: Remove unused MAX macro * gl/lib/randread.c (randread_error): Add __attribute__((__noreturn__))
Diffstat (limited to 'gl/lib/randread.c')
-rw-r--r--gl/lib/randread.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gl/lib/randread.c b/gl/lib/randread.c
index 798d4e0a3..48ce92e9a 100644
--- a/gl/lib/randread.c
+++ b/gl/lib/randread.c
@@ -39,6 +39,16 @@
#include "unlocked-io.h"
#include "xalloc.h"
+#ifndef __attribute__
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8)
+# define __attribute__(x) /* empty */
+# endif
+#endif
+
+#ifndef ATTRIBUTE_NORETURN
+# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
+#endif
+
#ifndef MIN
# define MIN(a, b) ((a) < (b) ? (a) : (b))
#endif
@@ -100,7 +110,7 @@ struct randread_source
/* The default error handler. */
-static void
+static void ATTRIBUTE_NORETURN
randread_error (void const *file_name)
{
if (file_name)