aboutsummaryrefslogtreecommitdiff
path: root/binutils/objcopy.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2019-10-11 15:36:49 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2019-10-13 19:53:40 -0400
commit284782de0750d6c0a24f2c8fd712b2954423e849 (patch)
tree1e0ae7adf6a41c1e9f93950db89d2694a8ab2ae2 /binutils/objcopy.c
parentd039f01465b37026e538b06ff792aadc4b19bf24 (diff)
downloadgdb-284782de0750d6c0a24f2c8fd712b2954423e849.zip
gdb-284782de0750d6c0a24f2c8fd712b2954423e849.tar.gz
gdb-284782de0750d6c0a24f2c8fd712b2954423e849.tar.bz2
gdb: Silence -Wformat-nonliteral warning with clang
We get this warning when building with clang: CXX ui-out.o /home/smarchi/src/binutils-gdb/gdb/ui-out.c:590:22: error: format string is not a string literal [-Werror,-Wformat-nonliteral] do_message (style, format, args); ^~~~~~ This can be considered a legitimate warning, as call_do_message's format parameter is not marked as a format string. Therefore, we should normally mark the call_do_message method with the `format` attribute. However, doing so just moves (and multiplies) the problem, as all the uses of call_do_message in the vmessage method now warn. If we wanted to continue on that path, we should silence the warning for each of them, as a way of telling the compiler "it's ok, we know what we are doing". But since call_do_message is really just vmessage's little helper, it's simpler to just silence the warning at that single point. gdb/ChangeLog: * ui-out.c (ui_out::call_do_message): Silence -Wformat-nonliteral warning. Change-Id: I58ad41793448f38835c5d6ba7b9e5c4dd8df260f
Diffstat (limited to 'binutils/objcopy.c')
0 files changed, 0 insertions, 0 deletions