Adding to implicit function declaration whitelists [was: Re: How to suppress -Wimplicit-function-declaration warning, if <stdlib.h> really does not have the declaration?]

Jim DeLaHunt list+macports-dev at jdlh.com
Sat Jan 29 05:15:07 UTC 2022


On 2022-01-26 02:59, Joshua Root wrote:

> …In any case, we maintain lists of functions that are known not to 
> exist on each macOS version, so the warning can be suppressed. They 
> are in the ports tree here: 
> <https://github.com/macports/macports-ports/tree/master/_resources/port1.0/checks/implicit_function_declaration>…

I have filed Pull Request ​#13804 ''64550 Add 'at_quick_exit' to 10.14 
whitelist'' <https://github.com/macports/macports-ports/pull/13807> to, 
as the title says, add function name 'at_quick_exit' to the macosx10.14 
implicit declaration whitelist. I would appreciate attention to that PR 
when it is convenient for the right person.

I imagine that this same function name should be added to whitelists for 
other SDK versions. But I don't know how to test and confirm this. Is 
there a process for checking whitelist entries across all SDK versions? 
Say, via the buildbots?

Once a whitelist is modified, when does a MacPorts installation benefit 
from that change?  Immediately, because the implicit function 
declaration code reaches back to MacPorts to get the most recent 
whitelists? After the next port selfupdate? After the next port base 
code new version release?

Also, I could not find documentation on the whitelist process, or on the 
Portfile declaration 
"configure.checks.implicit_function_declaration.whitelist-append".

So I added two new sections to the Wiki page *WimplicitFunctionDeclaration*:

*Add names to implicit declaration whitelist* 
<https://trac.macports.org/wiki/WimplicitFunctionDeclaration#Addnamestoimplicitdeclarationwhitelist>

*Add names to whitelist via Portfile* 
<https://trac.macports.org/wiki/WimplicitFunctionDeclaration#AddnamestowhitelistviaPortfile>

I wrote something which seemed plausible to me, in the belief that 
flawed documentation is better than no documentation. But I wrote 
largely without direct knowledge of how whitelist work, and how we 
should use them. Thus I would appreciate review of these sections of the 
Wiki page in particular.

Best regards,
     —Jim DeLaHunt, Vancouver, Canada
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20220128/2e73b95c/attachment.htm>


More information about the macports-dev mailing list