This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug build/22495] New: remote-sim.c should be built with -Wno-format-literal
- From: "kryukov at frtk dot ru" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Sun, 26 Nov 2017 04:28:41 +0000
- Subject: [Bug build/22495] New: remote-sim.c should be built with -Wno-format-literal
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=22495
Bug ID: 22495
Summary: remote-sim.c should be built with -Wno-format-literal
Product: gdb
Version: HEAD
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: build
Assignee: unassigned at sourceware dot org
Reporter: kryukov at frtk dot ru
Target Milestone: ---
Hi
remote-sim.c contains calls of `vfprintf_filtered` function with non-literal
format. Clang is able to track that if '-Wformat-literal' warning is enabled,
leading to compilation failure:
clang++-5.0 -x c++ -std=gnu++11 -g -O2 -I. -I. -I./common -I./config
-DLOCALEDIR="\"/home/travis/build/pavelkryukov/gnu-binutils-clang/binutils-gdb/cross/mips/share/locale\""
-DHAVE_CONFIG_H -I./../include/opcode -I./../opcodes/.. -I./../readline/..
-I../bfd -I./../bfd -I./../include -I../libdecnumber -I./../libdecnumber
-I./gnulib/import -Ibuild-gnulib/import -DTUI=1 -I/usr/include/python2.7
-I/usr/include/python2.7 -Wall -Wpointer-arith -Wno-unused -Wunused-value
-Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body
-Wno-sign-compare -Wno-narrowing -Wno-mismatched-tags -Wformat-nonliteral
-Werror -c -o remote-sim.o -MT remote-sim.o -MMD -MP -MF ./.deps/remote-sim.Tpo
remote-sim.c
remote-sim.c:386:34: error: format string is not a string literal
[-Werror,-Wformat-nonliteral]
vfprintf_filtered (gdb_stdout, format, args);
As a workaround, we may add an exception for `remote-sim.c` in the same manner
as for `target-float.c`. I pushed a patch to master branch of this repository:
https://github.com/pavelkryukov/binutils-gdb.git
--
You are receiving this mail because:
You are on the CC list for the bug.