This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

format string is not a string literal


   Building gdb 7.9 on x86_64-apple-darwin14 produces a number of
warnings from -Wformat-nonliteral...

darwin-nat.c:184:23: warning: format string is not a string literal
[-Wformat-nonliteral]
  vprintf_unfiltered (fmt, ap);
                      ^~~

remote.c:6986:37: warning: format string is not a string literal
[-Wformat-nonliteral]
  if (vsnprintf (rs->buf, max_size, format, ap) >= max_size)
                                    ^~~~~~
/usr/include/secure/_stdio.h:75:63: note: expanded from macro 'vsnprintf'
  __builtin___vsnprintf_chk (str, len, 0, __darwin_obsz(str), format, ap)
                                                              ^
ctf.c:109:39: warning: format string is not a string literal
[-Wformat-nonliteral]
  if (vfprintf (handler->metadata_fd, format, args) < 0)
                                      ^~~~~~

./guile/scm-string.c:70:25: warning: format string is not a string
literal [-Wformat-nonliteral]
  string = xstrvprintf (format, args);
                        ^~~~~~

./guile/scm-utils.c:86:25: warning: format string is not a string
literal [-Wformat-nonliteral]
  string = xstrvprintf (format, args);
                        ^~~~~~

auto-load.c:486:40: warning: format string is not a string literal
[-Wformat-nonliteral]
      vfprintf_unfiltered (gdb_stdlog, debug_fmt, debug_args);
                                       ^~~~~~~~~

complaints.c:188:10: warning: format string is not a string literal
[-Wformat-nonliteral]
                       complaint->fmt, args);
                       ^~~~~~~~~~~~~~
complaints.c:195:12: warning: format string is not a string literal
[-Wformat-nonliteral]
        vwarning (complaint->fmt, args);
                  ^~~~~~~~~~~~~~
complaints.c:200:23: warning: format string is not a string literal
[-Wformat-nonliteral]
          msg = xstrvprintf (complaint->fmt, args);
                             ^~~~~~~~~~~~~~

./compile/compile-object-load.c:235:22: warning: format string is not
a string literal [-Wformat-nonliteral]
  str = xstrvprintf (fmt, ap);
                     ^~~
./compile/compile-loc2c.c:453:30: warning: format string is not a
string literal [-Wformat-nonliteral]
  vfprintf_filtered (stream, format, args);
                             ^~~~~~
./compile/compile-loc2c.c:470:30: warning: format string is not a
string literal [-Wformat-nonliteral]
  vfprintf_filtered (stream, format, args);
                             ^~~~~~
./compile/compile-loc2c.c:485:30: warning: format string is not a
string literal [-Wformat-nonliteral]
  vfprintf_filtered (stream, format, args);
                             ^~~~~~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]