[Swan-dev] CentOS 6 "implicit declaration of function ‘printf’"

Andrew Cagney andrew.cagney at gmail.com
Thu Jun 20 20:25:18 UTC 2019


On Wed, 19 Jun 2019 at 15:15, Paul Wouters <paul at nohats.ca> wrote:
>
> On Tue, 18 Jun 2019, Andrew Cagney wrote:
>
> > why is a library function calling printf()? (if a c file needs
> > something #include it).
>
> Because it is used in addconn which has no logging mechanism and only
> uses stdout?
>
> There are also many calls to fprintf() within the test compile sections
> when some files are compiled with "main()" enabled. Since I dont think
> we ever used this in libreswan for any testing, I'd prefer to remove
> all of those.

Yea, as I've extracted the tests and moved them to testing/*check/,
I've been zapping the old code.  I see the following remain:

lib/libswan/keyblobtoid.c:int main(argc, argv)
lib/libswan/sanitizestring.c:int main(int argc, char *argv[])
lib/libswan/ttodata.c:int main(int argc, char *argv[])
lib/libswan/ttoprotoport.c:int main(int argc, char *argv[])
lib/libswan/ttosa.c:int main(int argc, char *argv[])

(I've no immediate interest in these as they are mostly about parsing).


More information about the Swan-dev mailing list