Wireshark mailing list archives

checkapi


From: Graham Bloice <graham.bloice () trihedral com>
Date: Sun, 10 Apr 2016 21:44:26 +0100

After creating an initial change to add checkAPI to CMake builds, following
the current checks done by nmake, I got the attached (massaged) output.

While there are some warnings to be fixed up, I'm more interested in the
errors as they'll make a build as bad until fixed.  Are these errors ones
that should be fixed, or should the offending files be excluded from
checkAPI.

CUSTOMBUILD : error : Found prohibited APIs in
C:/buildbot/builders/windows-x86-petri-dish/windows-x86-petri-dish/build/cmbuild/epan/dfilter/scanner.c:
malloc,realloc,free
[C:\buildbot\builders\windows-x86-petri-dish\windows-x86-petri-dish\build\cmbuild\epan\dfilter\checkAPI_dfilter.vcxproj]
CUSTOMBUILD : error : Found prohibited APIs in
C:/buildbot/builders/windows-x86-petri-dish/windows-x86-petri-dish/build/cmbuild/epan/dfilter/grammar.c:
realloc,free
[C:\buildbot\builders\windows-x86-petri-dish\windows-x86-petri-dish\build\cmbuild\epan\dfilter\checkAPI_dfilter.vcxproj]
CUSTOMBUILD : error : Found prohibited APIs in app_mem_usage.c: open
[C:\buildbot\builders\windows-x86-petri-dish\windows-x86-petri-dish\build\cmbuild\epan\checkAPI_epan.vcxproj]
CUSTOMBUILD : error : Found prohibited APIs in guid-utils.c: _snwprintf
[C:\buildbot\builders\windows-x86-petri-dish\windows-x86-petri-dish\build\cmbuild\epan\checkAPI_epan.vcxproj]
CUSTOMBUILD : error : Found prohibited APIs in
C:/buildbot/builders/windows-x86-petri-dish/windows-x86-petri-dish/build/cmbuild/epan/diam_dict.c:
strncpy,strdup,malloc,realloc,free
[C:\buildbot\builders\windows-x86-petri-dish\windows-x86-petri-dish\build\cmbuild\epan\checkAPI_epan.vcxproj]
CUSTOMBUILD : error : Found prohibited APIs in
C:/buildbot/builders/windows-x86-petri-dish/windows-x86-petri-dish/build/cmbuild/epan/dtd_parse.c:
malloc,realloc,free,strerror
[C:\buildbot\builders\windows-x86-petri-dish\windows-x86-petri-dish\build\cmbuild\epan\checkAPI_epan.vcxproj]
CUSTOMBUILD : error : Found prohibited APIs in
C:/buildbot/builders/windows-x86-petri-dish/windows-x86-petri-dish/build/cmbuild/epan/dtd_preparse.c:
malloc,realloc,free,strerror
[C:\buildbot\builders\windows-x86-petri-dish\windows-x86-petri-dish\build\cmbuild\epan\checkAPI_epan.vcxproj]
CUSTOMBUILD : error : Found prohibited APIs in
C:/buildbot/builders/windows-x86-petri-dish/windows-x86-petri-dish/build/cmbuild/epan/radius_dict.c:
malloc,realloc,free,strerror
[C:\buildbot\builders\windows-x86-petri-dish\windows-x86-petri-dish\build\cmbuild\epan\checkAPI_epan.vcxproj]
CUSTOMBUILD : error : Found prohibited APIs in
C:/buildbot/builders/windows-x86-petri-dish/windows-x86-petri-dish/build/cmbuild/epan/uat_load.c:
malloc,realloc,free
[C:\buildbot\builders\windows-x86-petri-dish\windows-x86-petri-dish\build\cmbuild\epan\checkAPI_epan.vcxproj]
CUSTOMBUILD : error : Found prohibited APIs in
C:/buildbot/builders/windows-x86-petri-dish/windows-x86-petri-dish/build/cmbuild/epan/dtd_grammar.c:
realloc,free
[C:\buildbot\builders\windows-x86-petri-dish\windows-x86-petri-dish\build\cmbuild\epan\checkAPI_epan.vcxproj]
CUSTOMBUILD : error : Found prohibited APIs in ftype-guid.c: strncpy
[C:\buildbot\builders\windows-x86-petri-dish\windows-x86-petri-dish\build\cmbuild\epan\ftypes\checkAPI_ftypes.vcxproj]
CUSTOMBUILD : error : Found prohibited APIs in ftype-pcre.c: strcpy
[C:\buildbot\builders\windows-x86-petri-dish\windows-x86-petri-dish\build\cmbuild\epan\ftypes\checkAPI_ftypes.vcxproj]
CUSTOMBUILD : error : Found prohibited APIs in ftype-string.c: strcpy
[C:\buildbot\builders\windows-x86-petri-dish\windows-x86-petri-dish\build\cmbuild\epan\ftypes\checkAPI_ftypes.vcxproj]
CUSTOMBUILD : error : Found prohibited APIs in ftype-time.c: strcpy
[C:\buildbot\builders\windows-x86-petri-dish\windows-x86-petri-dish\build\cmbuild\epan\ftypes\checkAPI_ftypes.vcxproj]
CUSTOMBUILD : error : Found prohibited APIs in
C:/buildbot/builders/windows-x86-petri-dish/windows-x86-petri-dish/build/cmbuild/plugins/mate/mate_grammar.c:
realloc,free
[C:\buildbot\builders\windows-x86-petri-dish\windows-x86-petri-dish\build\cmbuild\plugins\mate\checkAPI_mate.vcxproj]
CUSTOMBUILD : error : Found abort APIs in
C:/buildbot/builders/windows-x86-petri-dish/windows-x86-petri-dish/build/cmbuild/plugins/mate/mate_grammar.c:
assert
[C:\buildbot\builders\windows-x86-petri-dish\windows-x86-petri-dish\build\cmbuild\plugins\mate\checkAPI_mate.vcxproj]
CUSTOMBUILD : error : Found prohibited APIs in
C:/buildbot/builders/windows-x86-petri-dish/windows-x86-petri-dish/build/cmbuild/plugins/mate/mate_parser.c:
malloc,realloc,free
[C:\buildbot\builders\windows-x86-petri-dish\windows-x86-petri-dish\build\cmbuild\plugins\mate\checkAPI_mate.vcxproj]
CUSTOMBUILD : error : Found abort APIs in
C:/buildbot/builders/windows-x86-petri-dish/windows-x86-petri-dish/build/cmbuild/plugins/mate/mate_parser.c:
exit,g_error
[C:\buildbot\builders\windows-x86-petri-dish\windows-x86-petri-dish\build\cmbuild\plugins\mate\checkAPI_mate.vcxproj]
CUSTOMBUILD : error : Found prohibited APIs in text_import_scanner.l:
malloc,realloc,free
[C:\buildbot\builders\windows-x86-petri-dish\windows-x86-petri-dish\build\cmbuild\ui\checkAPI_ui-base.vcxproj]
CUSTOMBUILD : error : Found prohibited APIs in
C:/buildbot/builders/windows-x86-petri-dish/windows-x86-petri-dish/build/cmbuild/wiretap/ascend_scanner.c:
malloc,realloc,free
[C:\buildbot\builders\windows-x86-petri-dish\windows-x86-petri-dish\build\cmbuild\wiretap\checkAPI_wiretap.vcxproj]
CUSTOMBUILD : error : Found prohibited APIs in
C:/buildbot/builders/windows-x86-petri-dish/windows-x86-petri-dish/build/cmbuild/wiretap/k12text.c:
malloc,realloc,free
[C:\buildbot\builders\windows-x86-petri-dish\windows-x86-petri-dish\build\cmbuild\wiretap\checkAPI_wiretap.vcxproj]
CUSTOMBUILD : error : Found prohibited APIs in
C:/buildbot/builders/windows-x86-petri-dish/windows-x86-petri-dish/build/cmbuild/wiretap/ascend.c:
malloc,free
[C:\buildbot\builders\windows-x86-petri-dish\windows-x86-petri-dish\build\cmbuild\wiretap\checkAPI_wiretap.vcxproj]
CUSTOMBUILD : error : Found prohibited APIs in ascend_scanner.l:
malloc,realloc,free
[C:\buildbot\builders\windows-x86-petri-dish\windows-x86-petri-dish\build\cmbuild\wiretap\checkAPI_wiretap.vcxproj]
CUSTOMBUILD : error : Found prohibited APIs in k12text.l:
malloc,realloc,free
[C:\buildbot\builders\windows-x86-petri-dish\windows-x86-petri-dish\build\cmbuild\wiretap\checkAPI_wiretap.vcxproj]
CUSTOMBUILD : error : Found prohibited APIs in getopt_long.c: malloc,free
[C:\buildbot\builders\windows-x86-petri-dish\windows-x86-petri-dish\build\cmbuild\wsutil\checkAPI_wsutil.vcxproj]
CUSTOMBUILD : error : Found prohibited APIs in inet_aton.c:
htonl,isascii,isdigit,islower,isspace,isxdigit
[C:\buildbot\builders\windows-x86-petri-dish\windows-x86-petri-dish\build\cmbuild\wsutil\checkAPI_wsutil.vcxproj]
CUSTOMBUILD : error : Found prohibited APIs in strptime.c:
isspace,strncasecmp
[C:\buildbot\builders\windows-x86-petri-dish\windows-x86-petri-dish\build\cmbuild\wsutil\checkAPI_wsutil.vcxproj]


-- 
Graham Bloice

Attachment: full_checkAPI.txt
Description:

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: