This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/81163] New: error: ‘snprintf’ output may be truncated before the last format character [-werror=format-truncation=] note: ‘snprintf’ output between 2 and 266 bytes into a destination of size 255
- From: "perfeitoan at hotmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 21 Jun 2017 23:24:20 +0000
- Subject: [Bug tree-optimization/81163] New: error: ‘snprintf’ output may be truncated before the last format character [-werror=format-truncation=] note: ‘snprintf’ output between 2 and 266 bytes into a destination of size 255
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81163
Bug ID: 81163
Summary: error: ‘snprintf’ output may be truncated before the
last format character [-werror=format-truncation=]
note: ‘snprintf’ output between 2 and 266 bytes into a
destination of size 255
Product: gcc
Version: 7.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: perfeitoan at hotmail dot com
Target Milestone: ---
Using gcc 7.1.1 and compiling Linux kernel version 3.10.18 the file name
relay.c: 423: 30 gcc stops compiling with this error message.
Using other versions prior to version 5 and including compilation occurs
without problems.
Compilated in system ARM 32Bits Nvidia Tegra Tk1
I am using an ARM 32 bit machine from Nvidia model TK1 and linux distribution
Arch ARM
Isn't work compile Kernel 3.10.18-21 with gcc 7.1 !!!!
Take a look the crash
CC kernel/relay.o ----> apper in version 3.10.18 -19 -20 and .21 too this code
.... the Problemmmm !!, isnt ja the code of archive relay.o
kernel/relay.c: In function ‘relay_create_buf_file’:
kernel/relay.c:423:30: error: ‘snprintf’ output may be truncated before the
last format character [-Werror=format-truncation=]
snprintf(tmpname, NAME_MAX, "%s%d", chan->base_filename, cpu);
^~~~~~
kernel/relay.c:423:2: note: ‘snprintf’ output between 2 and 266 bytes into a
destination of size 255
snprintf(tmpname, NAME_MAX, "%s%d", chan->base_filename, cpu);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [scripts/Makefile.build:309: kernel/relay.o] Error 1
make: *** [Makefile:807: kernel] Error 2
==> ERROR: A failure occurred in build().
Aborting...
follow my host configures:
gcc (GCC) 7.1.1 20170516
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
MACHINE --- Chormebook HP 14 G3 running and compile
Linux alarm 3.10.18-19-ARCH #1 SMP Sun Mar 19 14:34:27 CET 2017 armv7l
GNU/Linux