[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
- [PATCH 12/17] diff3: simplify process_diff, (continued)
- [PATCH 12/17] diff3: simplify process_diff, Paul Eggert, 2021/08/22
- [PATCH 09/17] diff: remove printint, Paul Eggert, 2021/08/22
- [PATCH 14/17] diff: use mempcpy, Paul Eggert, 2021/08/22
- [PATCH 08/17] diff: remove INT_MAX limit on -F/-p searches, Paul Eggert, 2021/08/22
- [PATCH 03/17] diff3: suppress -fanalyzer alarms, Paul Eggert, 2021/08/22
- [PATCH 16/17] maint: refactor integer overflow checking, Paul Eggert, 2021/08/22
- [PATCH 04/17] maint: zalloc → xzalloc, Paul Eggert, 2021/08/22
- [PATCH 13/17] sdiff: fix unlikely memory leak, Paul Eggert, 2021/08/22
- [PATCH 02/17] maint: remove January workaround for Gnulib issue, Paul Eggert, 2021/08/22
- [PATCH 17/17] diff: add integer overflow checking, Paul Eggert, 2021/08/22
- [PATCH 10/17] maint: lint → GCC_LINT,
Paul Eggert <=
- [PATCH 05/17] maint: remove prepargs, Paul Eggert, 2021/08/22
- [PATCH 07/17] maint: .gitignore updates, Paul Eggert, 2021/08/22
- [PATCH 11/17] maint: modernize IF_LINT for GCC 11.2.1, Paul Eggert, 2021/08/22
- [PATCH 15/17] diff: avoid sprintf %s, Paul Eggert, 2021/08/22