Re: [pkg-ntp-maintainers] Bug#653771: FTBFS on kfreebsd-* due to -Wformat-security

2012-01-04 Thread Steven Chamberlain
On 03/01/12 21:51, Peter Eisentraut wrote:
 I think the below is a more correct fix.  Could you check whether it
 works for you?

Hi Peter,

Your suggestion builds okay on kfreebsd-i386, it prevents the
-Wformat-security warning, and it runs fine.

I've copied your patch and mine to upstream to see which way they would
prefer to fix this:  http://bugs.ntp.org/show_bug.cgi?id=2106

Thanks,
Regards,
-- 
Steven Chamberlain
ste...@pyro.eu.org


-- 
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4f05030b.7040...@pyro.eu.org



Re: [pkg-ntp-maintainers] Bug#653771: FTBFS on kfreebsd-* due to -Wformat-security

2012-01-03 Thread Peter Eisentraut
I think the below is a more correct fix.  Could you check whether it
works for you?

--- a/ntpd/refclock_oncore.c
+++ b/ntpd/refclock_oncore.c
@@ -4058,7 +4058,7 @@ oncore_log (
 
snprintf(Msg, sizeof(Msg), ONCORE[%d]: %s, instance-unit,
 msg);
-   syslog(log_level, Msg);
+   syslog(log_level, %s, Msg);
 
i = strlen(msg);
 
--- a/lib/isc/include/isc/msgcat.h
+++ b/lib/isc/include/isc/msgcat.h
@@ -110,7 +110,7 @@ isc_msgcat_close(isc_msgcat_t **msgcatp)
 
 const char *
 isc_msgcat_get(isc_msgcat_t *msgcat, int set, int message,
-  const char *default_text);
+  const char *default_text) __attribute__((format_arg(4)));
 /*%
  * Get message 'message' from message set 'set' in 'msgcat'.  If it
  * is not available, use 'default_text'.



-- 
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/1325627470.19883.2.ca...@vanquo.pezone.net



Re: [pkg-ntp-maintainers] Bug#653771: FTBFS on kfreebsd-* due to -Wformat-security

2011-12-31 Thread Steven Chamberlain
On 31/12/11 20:48, Peter Eisentraut wrote:
 On fre, 2011-12-30 at 23:29 +, Steven Chamberlain wrote:
 My new patch (attached) fixes only those parts, and I am now able to
 build successfully on kfreebsd-i386.
 
 Why did you change printf to fprintf(stdout, ...)?

Hi,

I saw it written that way in other code, functionally it would be
identical, so I was just trying to be consistent, e.g.:

./ntpd/refclock_jupiter.c:903:  fprintf(stdout, %s: , function);

But actually use of printf seems more common overall... I should
probably have kept it the same.

Regards,
-- 
Steven Chamberlain
ste...@pyro.eu.org


-- 
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4eff784a.1090...@pyro.eu.org



Re: [pkg-ntp-maintainers] Bug#653771: FTBFS on kfreebsd-* due to -Wformat-security

2011-12-31 Thread Peter Eisentraut
On fre, 2011-12-30 at 23:29 +, Steven Chamberlain wrote:
 My new patch (attached) fixes only those parts, and I am now able to
 build successfully on kfreebsd-i386.

Why did you change printf to fprintf(stdout, ...)?


-- 
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/1325364488.8243.1.ca...@vanquo.pezone.net