gdbsupport: add format attribute to print_xml_feature::add_line
authorSimon Marchi <simon.marchi@efficios.com>
Sat, 27 Jun 2020 18:38:43 +0000 (14:38 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Sat, 27 Jun 2020 18:39:00 +0000 (14:39 -0400)
commit6db3031e5c8bbe94e2111633273d8e69e724220a
treecea4ea1a2dcc01f289045bada56003aee4c9d9a6
parent05779d57f9f4e7cbb6d4c79d8851d35a422bdd0d
gdbsupport: add format attribute to print_xml_feature::add_line

Fixes this clang error:

      CXX      tdesc.o
    /home/smarchi/src/binutils-gdb/gdbsupport/tdesc.cc:444:25: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
      string_vappendf (tmp, fmt, ap);
                            ^~~

There is already a but about GCC not emitting this warning:

    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82206

gdbsupport/ChangeLog:

* tdesc.h (class print_xml_feature) <add_line>: Add
ATTRIBUTE_PRINTF.

Change-Id: I7014075e83717f6d7e19d044a3675ff9981ebe17
gdbsupport/ChangeLog
gdbsupport/tdesc.h