emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#42656: closed (term.c:1405:25: warning: ‘%d’ directive writing betwe


From: GNU bug Tracking System
Subject: bug#42656: closed (term.c:1405:25: warning: ‘%d’ directive writing between 2 and 10 bytes into a region of size 3)
Date: Tue, 25 Aug 2020 13:39:04 +0000

Your message dated Tue, 25 Aug 2020 06:38:43 -0700
with message-id 
<CADwFkm=sCqGUtR1Z3P4qrs6_cm7CpZj0CzU+-7mx2dCqk2hGDw@mail.gmail.com>
and subject line Re: bug#42656: term.c:1405:25: warning: ‘%d’ directive writing 
between 2 and 10 bytes into a region of size 3
has caused the debbugs.gnu.org bug report #42656,
regarding term.c:1405:25: warning: ‘%d’ directive writing between 2 and 10 
bytes into a region of size 3
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
42656: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=42656
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: term.c:1405:25: warning: ‘%d’ directive writing between 2 and 10 bytes into a region of size 3 Date: Sat, 1 Aug 2020 15:27:48 -0400
I think this can be cleared by clamping the argument.

term.c: In function ‘term_get_fkeys_1’:
term.c:1405:25: warning: ‘%d’ directive writing between 2 and 10 bytes
into a region of size 3 [-Wformat-overflow=]
        sprintf (fkey, "f%d", i);
                         ^~
term.c:1405:23: note: directive argument in the range [11, 2147483646]
        sprintf (fkey, "f%d", i);
                       ^~~~~
In file included from /usr/include/stdio.h:862:0,
                 from ../lib/stdio.h:43,
                 from termchar.h:22,
                 from term.c:31:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:33:10: note:
‘__builtin___sprintf_chk’ output between 4 and 12 bytes into a
destination of size 4
   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,



--- End Message ---
--- Begin Message --- Subject: Re: bug#42656: term.c:1405:25: warning: ‘%d’ directive writing between 2 and 10 bytes into a region of size 3 Date: Tue, 25 Aug 2020 06:38:43 -0700 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
Paul Eggert <eggert@cs.ucla.edu> writes:

> I regularly get messages like that from old versions of GCC. It's better to
> ignore such messages, as we shouldn't clutter up the code merely to pacify 
> older
> (or buggy) compilers.
>
> You can build with --disable-gcc-warnings to suppress the annoyances with 
> older
> compilers (if you're building from Git, that is; you shouldn't need to specify
> anything if building from a tarball).

I think the consensus here is that this is a compiler bug that should be
ignored.  I'm therefore closing this bug report.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]