From 20ab8fc3080fb5c115116d3ba71c5b093eef278c Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 22 Aug 2021 13:54:04 -0700 Subject: =?UTF-8?q?maint:=20lint=20=E2=86=92=20GCC=5FLINT?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ‘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 /* 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 */ -- cgit v1.2.1