summaryrefslogtreecommitdiff
path: root/gdb/unittests
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@ericsson.com>2017-10-27 23:36:19 -0400
committerSimon Marchi <simon.marchi@ericsson.com>2017-10-27 23:36:45 -0400
commitb5540b5f2b9cd5fcbac6504359b856d3f43267b5 (patch)
treee6c6adb1c9df57ea6d15ffb2b59166151774f322 /gdb/unittests
parent5a9dcda14c240eccee5c1de53cf4ae936230ed0c (diff)
downloadbinutils-gdb-b5540b5f2b9cd5fcbac6504359b856d3f43267b5.tar.gz
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.
Diffstat (limited to 'gdb/unittests')
-rw-r--r--gdb/unittests/common-utils-selftests.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/unittests/common-utils-selftests.c b/gdb/unittests/common-utils-selftests.c
index 0f26b219af4..c48904ba0fc 100644
--- a/gdb/unittests/common-utils-selftests.c
+++ b/gdb/unittests/common-utils-selftests.c
@@ -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;