]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
CODE_STYLE.md: sync banned function list with checksrc.pl
authorViktor Szakats <commit@vsz.me>
Thu, 27 Nov 2025 17:32:35 +0000 (18:32 +0100)
committerViktor Szakats <commit@vsz.me>
Thu, 27 Nov 2025 17:53:35 +0000 (18:53 +0100)
Also alpha sort the list in checksrc.pl.

Closes #19733

docs/internals/CODE_STYLE.md
scripts/checksrc.pl

index 0d072c04c306dca4ad096c88728190d510cb9603..7d37df4805ece7aa5776051e27e60d537f44fa85 100644 (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
index d38ffecdb9b1a2e85dcd10639c207844a6c8fb50..49290ff137a5f264aa1ea2f9e45f5f03d40f1bdf 100755 (executable)
@@ -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 = (