diffutils-devel
[Top][All Lists]
Advanced

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

[PATCH 10/17] maint: lint → GCC_LINT


From: Paul Eggert
Subject: [PATCH 10/17] maint: lint → GCC_LINT
Date: Sun, 22 Aug 2021 14:02:59 -0700

‘lint’ is for traditional lint and perhaps some other tools;
‘GCC_LINT’ is targeted more for what we do.
Gnulib accepts either, but we might as well be more accurate.
* configure.ac (GCC_LINT): Define this instead of ‘lint’.
All uses changed.
---
 configure.ac | 3 ++-
 src/diff3.c  | 6 +++---
 src/system.h | 2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index b532d43..c13b472 100644
--- a/configure.ac
+++ b/configure.ac
@@ -84,7 +84,8 @@ if test "$gl_gcc_warnings" = yes; then
 
   AC_SUBST([WARN_CFLAGS])
 
-  AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.])
+  AC_DEFINE([GCC_LINT], [1],
+    [Define to 1 if the compiler is checking for lint.])
   AC_DEFINE([_FORTIFY_SOURCE], [2],
     [enable compile-time and run-time bounds-checking, and some warnings])
   AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability checks])
diff --git a/src/diff3.c b/src/diff3.c
index 01e8ecd..09d987f 100644
--- a/src/diff3.c
+++ b/src/diff3.c
@@ -88,7 +88,7 @@ struct diff_block {
   char **lines[2];             /* The actual lines (may contain nulls) */
   size_t *lengths[2];          /* Line lengths (including newlines, if any) */
   struct diff_block *next;
-#ifdef lint
+#ifdef GCC_LINT
   struct diff_block *n2;       /* Used only when freeing.  */
 #endif
 };
@@ -228,7 +228,7 @@ static struct option const longopts[] =
 static void
 free_diff_block (struct diff_block *p)
 {
-#ifndef lint
+#ifndef GCC_LINT
   (void)p;
 #else
   while (p)
@@ -249,7 +249,7 @@ free_diff_block (struct diff_block *p)
 static void
 next_to_n2 (struct diff_block *p)
 {
-#ifndef lint
+#ifndef GCC_LINT
   (void)p;
 #else
   while (p)
diff --git a/src/system.h b/src/system.h
index 1e7c288..b6d86a9 100644
--- a/src/system.h
+++ b/src/system.h
@@ -21,7 +21,7 @@
 #include <config.h>
 
 /* Use this to suppress gcc's "...may be used before initialized" warnings. */
-#ifdef lint
+#ifdef GCC_LINT
 # define IF_LINT(Code) Code
 #else
 # define IF_LINT(Code) /* empty */
-- 
2.31.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]