From: Paul Eggert <eggert@cs.ucla.edu>
To: Jim Meyering <jim@meyering.net>
Cc: Gnulib bugs <bug-gnulib@gnu.org>
Subject: Re: any pending fixes? preparing for diffutils release
Date: Sun, 1 Aug 2021 15:14:58 -0700 [thread overview]
Message-ID: <f1d70ad6-0a9e-475d-8b83-41006c691b2f@cs.ucla.edu> (raw)
In-Reply-To: <CA+8g5KGbCS=y=o2a5r5yL=59gLQ+Q8bvVVh04kte5+eMCgKwig@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 967 bytes --]
I've recently been improving some GCC-based static analysis in Gnulib,
and syncing from Gnulib to diffutils meant that you have a bit of a
work-in-progress there. I plan to make further such changes soon.
The Gnulib work already installed is conservative and I see no harm in
releasing what we've got in diffutils now. I'm sending this email mainly
to give you a heads-up that more Gnulib changes are coming.
FWIW attached are the diffutils patches I have so far. They assume the
abovementioned Gnulib work-in-progress and this should not be installed
in diffutils yet. Most likely more minor diffutils patches will be
needed once I've finished the Gnulib changes I have in mind.
Until today I've been using the Gnulib work-in-progress on grep rather
than on diffutils. I've found one memory leak there and hope to find
more bugs - after all, that's the point of all this. I didn't find any
diffutils bugs in my brief run-through today.
[-- Attachment #2: diffutils.diff --]
[-- Type: text/x-patch, Size: 1893 bytes --]
diff --git a/configure.ac b/configure.ac
index 73adb80..b532d43 100644
--- a/configure.ac
+++ b/configure.ac
@@ -96,10 +96,6 @@ if test "$gl_gcc_warnings" = yes; then
nw="$nw -Wsuggest-attribute=pure"
nw="$nw -Wduplicated-branches" # Too many false alarms
- # Avoid false alarm in lib/vasnprintf.c.
- # https://lists.gnu.org/r/bug-gnulib/2021-01/msg00031.html
- gl_WARN_ADD([-Wno-analyzer-null-argument])
-
gl_MANYWARN_COMPLEMENT([GNULIB_WARN_CFLAGS], [$WARN_CFLAGS], [$nw])
AC_SUBST([GNULIB_WARN_CFLAGS])
fi
diff --git a/src/diff.h b/src/diff.h
index 27362c0..0849a55 100644
--- a/src/diff.h
+++ b/src/diff.h
@@ -355,7 +355,9 @@ extern void print_context_script (struct change *, bool);
extern int diff_dirs (struct comparison const *,
int (*) (struct comparison const *,
char const *, char const *));
-extern char *find_dir_file_pathname (char const *, char const *);
+extern char *find_dir_file_pathname (char const *, char const *)
+ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE
+ _GL_ATTRIBUTE_RETURNS_NONNULL;
/* ed.c */
extern void print_ed_script (struct change *);
diff --git a/src/diff3.c b/src/diff3.c
index 6be7e3c..1f656b6 100644
--- a/src/diff3.c
+++ b/src/diff3.c
@@ -16,6 +16,14 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
\f
+/* As of GCC 11.2.1, gcc -Wanalyzer-too-complex reports that this
+ program's code is too complicated for gcc -fanalyzer.
+ FIXME: Compile with -DANALYZER_NULL_DEFERENCE and see whether the
+ resulting diagnostics are false alarms. */
+#if 10 <= __GNUC__ && !ANALYZER_NULL_DEREFERENCE
+# pragma GCC diagnostic ignored "-Wanalyzer-null-dereference"
+#endif
+
#include "system.h"
#include "paths.h"
next prev parent reply other threads:[~2021-08-01 22:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-01 19:44 any pending fixes? preparing for diffutils release Jim Meyering
2021-08-01 22:14 ` Paul Eggert [this message]
2021-08-02 0:53 ` Jim Meyering
2021-08-02 5:36 ` Paul Eggert
2021-08-02 5:48 ` Jim Meyering
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f1d70ad6-0a9e-475d-8b83-41006c691b2f@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=bug-gnulib@gnu.org \
--cc=jim@meyering.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).