Wireshark mailing list archives

Re: What mean "Error: Found prohibited APIs in ..." error during build?


From: Jirka Novak <j.novak () netsystem cz>
Date: Tue, 9 Feb 2021 09:26:58 +0100

Hi,

    > Also use ws_close() instead of close().  (The ws_ calls, on
    Windows, also call the Visual Studio C library routines that
    implement UN*X-style APIs, with an underscore preceding the UN*X API
    name.)

    Thank you for explanation and I understand the reasons, but I don't
    think it is possible in this case. Classes extending QIODevice where
    open/close are parent methods I must call/override.
    It looks that it is false positive check. Is there any way how to add
    exception to check in this case?


THere is already some code in checkAPIs.pl file to identify false positives:

                # Match function calls, but ignore false positives from:
                # C++ method definition: int MyClass::open(...)
                # Method invocation: myClass->open(...);
                # Function declaration: int open(...);
                # Method invocation: QString().sprintf(...)
                while (${$fileContentsRef} =~ m/ \W (?<!::|->|\w\ )
(?<!\.) $api \W* \( /gx)
                {
                        $cnt += 1;
                }
                if ($cnt > 0) {
                        push @{$foundAPIsRef}, $api;
                        $groupHashRef->{function_counts}->{$api} += 1;
                }

This probably needs to be improved for your use case.

OK, I will try it.

                                        Best regards,

                                                Jirka Novak

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

Current thread: