common-utils-selftests.c: Add ATTRIBUTE_PRINTF
Fix this, when building with clang: /home/emaisin/src/binutils-gdb/gdb/unittests/common-utils-selftests.c:50:40: error: format string is not a string literal [-Werror,-Wformat-nonliteral] std::string result = string_vprintf (fmt, vp); ^~~ gdb/ChangeLog: * unittests/common-utils-selftests.c (format): Add ATTRIBUTE_PRINTF.
This commit is contained in:
parent
5a9dcda14c
commit
b5540b5f2b
|
@ -1,3 +1,8 @@
|
|||
2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
|
||||
|
||||
* unittests/common-utils-selftests.c (format): Add
|
||||
ATTRIBUTE_PRINTF.
|
||||
|
||||
2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
|
||||
|
||||
* xml-syscall.c (struct syscall_desc): Add constructor.
|
||||
|
|
|
@ -41,7 +41,7 @@ string_printf_tests ()
|
|||
SELF_CHECK (string_printf ("%s", X100000) == X100000);
|
||||
}
|
||||
|
||||
static std::string
|
||||
static std::string ATTRIBUTE_PRINTF (1, 2)
|
||||
format (const char *fmt, ...)
|
||||
{
|
||||
va_list vp;
|
||||
|
|
Loading…
Reference in New Issue