Compiling 4.1.0 on Mac OS 10.6: "format not a literal string..."
Tina Siegenthaler
tina at zool.uzh.ch
Wed Nov 25 15:46:00 UTC 2009
Hi list
Today, when compiled dhcpd 4.1.0 on Mac OS 10.6. I came across the
following error when runnig make (several times, actually):
warning: format not a string literal and no format arguments
The error occurred for the files print.c, dhclient.c, dhcrelay.c,
dhcpd.c. After some googling I found out that I had to insert "%s"
into several lines that called the function "log_info" (sorry if I'm
using the wrong expressions, I'm absolutely not a programmer), that
is , I had to change for example each occurence of
log_info (copyright)
into
log_info ("%s", copyright)
then it would compile fine.
I then tried to compile version 4.1.0 on Mac OS 10.5, and there it
would do so without modifications and without errors. What has changed
between Mac OS 10.5 and 10.6 is the version of gcc: It's gcc 4.0.1 on
10.5 and gcc 4.2.1 on 10.6, so I suspect that this is the cause for
this error? If it is, maybe it would be possible to include these
modifications in future releases, since the "patched" version compiled
fine also with gcc 4.0.1?
Sorry if that's already known to everybody but me, but I thought I'd
share that and didn't find anything about it in the archives.
Tina
More information about the dhcp-users
mailing list