forked from Imagelibrary/binutils-gdb
expprint: Fix format string warning
My compiler (gcc 5.4.0, clang 3.8) gives this warning:
/home/emaisin/src/binutils-gdb/gdb/expprint.c: In lambda function:
/home/emaisin/src/binutils-gdb/gdb/expprint.c:1055:35: error: format not a string literal and no format arguments [-Werror=format-security]
fprintf_filtered (stream, mod);
^
Fix it by not using the passed string as the format string.
gdb/ChangeLog:
* expprint.c (dump_subexp_body_standard): Use constant format
string in fprintf_filtered call.
This commit is contained in:
@@ -1052,7 +1052,7 @@ dump_subexp_body_standard (struct expression *exp,
|
||||
if (space)
|
||||
fputs_filtered (" ", stream);
|
||||
space = true;
|
||||
fprintf_filtered (stream, mod);
|
||||
fprintf_filtered (stream, "%s", mod);
|
||||
};
|
||||
if (flags & TYPE_INSTANCE_FLAG_CONST)
|
||||
print_one ("const");
|
||||
|
||||
Reference in New Issue
Block a user