GNU bug report logs - #77835
[PATCH] Pacify GCC 15 -Wunterminated-string-initialization warnings

Previous Next

Package: emacs;

Reported by: Collin Funk <collin.funk1 <at> gmail.com>

Date: Wed, 16 Apr 2025 05:25:02 UTC

Severity: normal

Tags: patch

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Collin Funk <collin.funk1 <at> gmail.com>
To: 77835 <at> debbugs.gnu.org
Subject: bug#77835: [PATCH] Pacify GCC 15 -Wunterminated-string-initialization warnings
Date: Tue, 15 Apr 2025 22:24:16 -0700
[Message part 1 (text/plain, inline)]
GCC 15.0 enables -Wunterminated-string-initialization when using
'-Wall -Wextra', which gets used when I run './configure'. This patch
silences the warnings:

fns.c: In function ‘hexbuf_digest’:
fns.c:6019:40: warning: initializer-string for array of ‘char’ truncates NUL terminator but destination lacks ‘nonstring’ attribute (17 chars into 16 available) [-Wunterminated-string-initialization]
 6019 |       static char const hexdigit[16] = "0123456789abcdef";
      |                                        ^~~~~~~~~~~~~~~~~~

Collin

[0001-Pacify-GCC-15-Wunterminated-string-initialization-wa.patch (text/x-patch, attachment)]

This bug report was last modified 32 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.