Don't give an error when format string is not a string literal.

This may be indicative of dubious code in some cases, but it can also have valid use cases that are not easy to modify.

If desired, this could be re-enabled under a separate lint flag (analogous to -Wformat-nonliteral in GCC/Clang, which is available as an option but is not included in -Wformat or -Wall).
This commit is contained in:
Stephen Heumann 2018-09-01 22:36:31 -05:00
parent 94ec3c73c7
commit ecff1e3479
1 changed files with 1 additions and 1 deletions

View File

@ -860,7 +860,7 @@ var
if (tk <> nil) and (tk^.token.kind = stringconst) then
get_format_string := tk^.token.sval
else
Error(125);
{Error(125) - disabled for now};
end; {if}
{ no format string -> Error(85) }
end; {get_format_string}