Do not do format checking on static functions.

It is legal for source files that do not include <stdio.h> to define static functions named printf, scanf, etc. These obviously are not the standard library functions and are not required to work the some way as them, so they should not be subject to format checking.
This commit is contained in:
Stephen Heumann 2023-02-12 19:19:28 -06:00
parent a6ef872513
commit cff8144c88

View File

@ -3397,8 +3397,11 @@ var
fmt := fmt_none; fmt := fmt_none;
fp := nil; fp := nil;
if ((lint & lintPrintf) <> 0) and fType^.varargs and not indirect then if (lint & lintPrintf) <> 0 then
fmt := FormatClassify(ftree^.id^.name^); if fType^.varargs then
if not indirect then
if ftree^.id^.storage <> private then
fmt := FormatClassify(ftree^.id^.name^);
while parameters <> nil do begin {count the prototypes} while parameters <> nil do begin {count the prototypes}
pCount := pCount+1; pCount := pCount+1;