Re: format string is not a string literal
Paul Smith <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <1424972642.824.33.camel@homebase> |
On Thu, 2015-02-26 at 09:52 +0000, Pedro Alves wrote: > + /* Use FMT from here on instead of complaint->fmt, to avoid "format > + string is not a string literal" warnings. */ > + gdb_assert (complaint->fmt == fmt); > + > if (complaint->file != NULL) > - internal_vwarning (complaint->file, complaint->line, > - complaint->fmt, args); > + internal_vwarning (complaint->file, complaint->line, fmt, args); Can someone quickly explain how using fmt instead of complaint->fmt here removes the warning? fmt is not a "string literal" either...? Just curious what the trick is...