CODE_STYLE.md: sync banned function list with checksrc.pl

Also alpha sort the list in checksrc.pl.

Closes #19733
This commit is contained in:
Viktor Szakats 2025-11-27 18:32:35 +01:00
parent 5c22bd5384
commit 986e6d4eae
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201
2 changed files with 87 additions and 51 deletions

View File

@ -334,14 +334,31 @@ This is the full list of functions generally banned.
_access
_mbscat
_mbsncat
_open
_tcscat
_tcsdup
_tcsncat
_tcsncpy
_waccess
_wcscat
_wcsdup
_wcsncat
_wfopen
_wfreopen
_wopen
accept
accept4
access
aprintf
atoi
atol
fclose
fdopen
fopen
fprintf
freeaddrinfo
freopen
getaddrinfo
gets
gmtime
LoadLibrary
@ -351,9 +368,19 @@ This is the full list of functions generally banned.
LoadLibraryExW
LoadLibraryW
localtime
mbstowcs
msnprintf
mvsnprintf
open
printf
recv
send
snprintf
socket
socketpair
sprintf
sscanf
stat
strcat
strerror
strncat
@ -362,6 +389,15 @@ This is the full list of functions generally banned.
strtok_r
strtol
strtoul
vaprintf
vfprintf
vprintf
vsnprintf
vsprintf
wcscpy
wcsdup
wcsncpy
wcstombs
WSASocket
WSASocketA
WSASocketW

View File

@ -48,76 +48,76 @@ my %ignore_used;
my @ignore_line;
my %banfunc = (
"gmtime" => 1,
"localtime" => 1,
"gets" => 1,
"strtok" => 1,
"sprintf" => 1,
"snprintf" => 1,
"vsprintf" => 1,
"vsnprintf" => 1,
"_access" => 1,
"_mbscat" => 1,
"_mbsncat" => 1,
"_open" => 1,
"_tcscat" => 1,
"_tcsdup" => 1,
"_tcsncat" => 1,
"_tcsncpy" => 1,
"_waccess" => 1,
"_wcscat" => 1,
"_wcsdup" => 1,
"_wcsncat" => 1,
"_wfopen" => 1,
"_wfreopen" => 1,
"_wopen" => 1,
"accept" => 1,
"accept4" => 1,
"access" => 1,
"aprintf" => 1,
"atoi" => 1,
"atol" => 1,
"fclose" => 1,
"fdopen" => 1,
"fopen" => 1,
"fprintf" => 1,
"freeaddrinfo" => 1,
"freopen" => 1,
"getaddrinfo" => 1,
"gets" => 1,
"gmtime" => 1,
"LoadLibrary" => 1,
"LoadLibraryA" => 1,
"LoadLibraryEx" => 1,
"LoadLibraryExA" => 1,
"LoadLibraryExW" => 1,
"LoadLibraryW" => 1,
"localtime" => 1,
"mbstowcs" => 1,
"msnprintf" => 1,
"mvsnprintf" => 1,
"open" => 1,
"printf" => 1,
"vaprintf" => 1,
"vfprintf" => 1,
"vprintf" => 1,
"recv" => 1,
"send" => 1,
"snprintf" => 1,
"socket" => 1,
"socketpair" => 1,
"sprintf" => 1,
"sscanf" => 1,
"stat" => 1,
"strcat" => 1,
"strerror" => 1,
"strncat" => 1,
"strncpy" => 1,
"strtok_r" => 1,
"strtok" => 1,
"strtol" => 1,
"strtoul" => 1,
"atoi" => 1,
"atol" => 1,
"_mbscat" => 1,
"_mbsncat" => 1,
"_tcscat" => 1,
"_tcsdup" => 1,
"_tcsncpy" => 1,
"_tcsncat" => 1,
"_wcscat" => 1,
"_wcsncat" => 1,
"_wcsdup" => 1,
"wcsdup" => 1,
"vaprintf" => 1,
"vfprintf" => 1,
"vprintf" => 1,
"vsnprintf" => 1,
"vsprintf" => 1,
"wcscpy" => 1,
"wcsdup" => 1,
"wcsncpy" => 1,
"mbstowcs" => 1,
"wcstombs" => 1,
"LoadLibrary" => 1,
"LoadLibraryA" => 1,
"LoadLibraryW" => 1,
"LoadLibraryEx" => 1,
"LoadLibraryExA" => 1,
"LoadLibraryExW" => 1,
"WSASocket" => 1,
"WSASocketA" => 1,
"WSASocketW" => 1,
"_waccess" => 1,
"_access" => 1,
"access" => 1,
"accept" => 1,
"accept4" => 1,
"freeaddrinfo" => 1,
"getaddrinfo" => 1,
"recv" => 1,
"send" => 1,
"socket" => 1,
"socketpair" => 1,
"fclose" => 1,
"fdopen" => 1,
"fopen" => 1,
"freopen" => 1,
"open" => 1,
"_open" => 1,
"_wfopen" => 1,
"_wfreopen" => 1,
"_wopen" => 1,
"stat" => 1,
);
my %warnings_extended = (