[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Findutils-patches] [PATCH 4/8] xargs: Avoid unused-macro warnings.
From: |
James Youngman |
Subject: |
[Findutils-patches] [PATCH 4/8] xargs: Avoid unused-macro warnings. |
Date: |
Sat, 2 Jan 2016 23:54:54 +0000 |
* xargs/xargs.c (main): Use __STDC_LIMIT_MACROS to avoid a
compiler warning about an unused macro. Don't define N_() at all, since
we don't use it.
---
xargs/xargs.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/xargs/xargs.c b/xargs/xargs.c
index 1116cfe..c4d632e 100644
--- a/xargs/xargs.c
+++ b/xargs/xargs.c
@@ -28,7 +28,7 @@
included (see the footnote to section 7.18.3 of ISO C99). Because
some other header may #include <stdint.h>, we define the macro
here, first. */
-#define __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS 1
/* config.h must be included first. */
#include <config.h>
@@ -75,12 +75,6 @@
#define textdomain(Domain)
#define bindtextdomain(Package, Directory)
#endif
-#ifdef gettext_noop
-# define N_(String) gettext_noop(String)
-#else
-/* See locate.c for explanation as to why not use (String) */
-# define N_(String) String
-#endif
#ifndef LONG_MAX
#define LONG_MAX (~(1 << (sizeof (long) * 8 - 1)))
@@ -403,6 +397,11 @@ main (int argc, char **argv)
enum { XARGS_POSIX_HEADROOM = 2048u };
struct sigaction sigact;
+ /* We #define __STDC_LIMIT_MACROS above for its side effect on
+ * <limits.h>, but we use it here to avoid getting what would
+ * otherwise be a spurious compiler warning. */
+ (void) __STDC_LIMIT_MACROS;
+
if (argv[0])
set_program_name (argv[0]);
else
--
2.1.4
- [Findutils-patches] (no subject), James Youngman, 2016/01/02
- [Findutils-patches] [PATCH 1/8] maint: Remove --I../intl from AM_CPPFLAGS; the directory is gone., James Youngman, 2016/01/02
- [Findutils-patches] [PATCH 4/8] xargs: Avoid unused-macro warnings.,
James Youngman <=
- [Findutils-patches] [PATCH 5/8] lib: Update the width of the st_nlink field and fix some compiler warnings., James Youngman, 2016/01/02
- [Findutils-patches] [PATCH 3/8] find: Fix a number of compiler warnings (mostly const-correctness)., James Youngman, 2016/01/02
- [Findutils-patches] [PATCH 2/8] maint: Don't define the gettext-related macro N_ where it is not needed., James Youngman, 2016/01/02
- [Findutils-patches] [PATCH 6/8] locate: Fix compiler warnings., James Youngman, 2016/01/02
- [Findutils-patches] [PATCH 8/8] configure: Add option --enable-compiler-warnings-are-errors, limit --enable-compiler-warnings., James Youngman, 2016/01/02
- [Findutils-patches] [PATCH 7/8] find: fix some compiler warnings., James Youngman, 2016/01/02