diff --git a/configure.ac b/configure.ac index 2b2f9468d..f33c10ccc 100644 --- a/configure.ac +++ b/configure.ac @@ -262,6 +262,10 @@ if test $gl_gcc_warnings != no; then # FP in careadlinkat.c w/gcc 10.0.1 20200205 gl_WARN_ADD([-Wno-return-local-addr]) + # FIXME: remove this line when gcc -O0 improves + # FP in nstrftime.c w/gcc 12.2.1 20221121 + gl_WARN_ADD([-Wno-stringop-overflow]) + gl_MANYWARN_COMPLEMENT([GNULIB_WARN_CFLAGS], [$WARN_CFLAGS], [$nw]) AC_SUBST([GNULIB_WARN_CFLAGS]) diff --git a/src/digest.c b/src/digest.c index 6ee8a4854..3c1d27f9a 100644 --- a/src/digest.c +++ b/src/digest.c @@ -1125,6 +1125,7 @@ hex_equal (unsigned char const *hex_digest, unsigned char const *bin_buffer) return cnt == digest_bin_bytes; } +# pragma GCC diagnostic ignored "-Wmaybe-uninitialized" static bool digest_check (char const *checkfile_name) { diff --git a/src/pr.c b/src/pr.c index 28a695242..75ce756ae 100644 --- a/src/pr.c +++ b/src/pr.c @@ -2422,7 +2422,7 @@ static bool read_line (COLUMN *p) { int c; - int chars; + int chars=0; int last_input_position; int j, k; COLUMN *q; diff --git a/src/sort.c b/src/sort.c index 8ca7a88c4..15f06e7d8 100644 --- a/src/sort.c +++ b/src/sort.c @@ -1045,7 +1045,7 @@ pipe_fork (int pipefds[2], size_t tries) struct tempnode *saved_temphead; int saved_errno; double wait_retry = 0.25; - pid_t pid; + pid_t pid = -1; struct cs_status cs; if (pipe2 (pipefds, O_CLOEXEC) < 0)