From: Dave H. <hel...@us...> - 2014-02-09 23:44:28
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "gather - Metric Data Gatherer". The branch, master has been updated via 544dde322302aea7e29ec4c82a3e1ad7cdcc56b8 (commit) from e70a1b2a87439737581d0a8e404cc9952b2e644c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 544dde322302aea7e29ec4c82a3e1ad7cdcc56b8 Author: Dave Heller <hel...@us...> Date: Sun Feb 9 18:43:16 2014 -0500 Fixed #2722: compile fails when -Werror=format-security flag is used ----------------------------------------------------------------------- Summary of changes: ChangeLog | 7 +++++++ Makefile.am | 2 +- NEWS | 1 + comms/rcctest.c | 2 +- gatherctl.c | 2 +- reposctl.c | 4 ++-- util/mlog.c | 4 ++-- 7 files changed, 15 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index f8755b7..23570ff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2014-02-09 Dave Heller <hel...@us...> + + * NEWS, comms/rcctest.c, gatherctl.c, reposctl.c, util/mlog.c + + Fixed #2722: compile fails when -Werror=format-security flag is used + (patch by Vitezslav Crhonek) + 2013-02-26 Tyrel Datwyler <ty...@li...> * NEWS, plugin/cimplugKvm.c, plugin/cimplugXen.c, diff --git a/Makefile.am b/Makefile.am index f5ffa21..4447186 100644 --- a/Makefile.am +++ b/Makefile.am @@ -124,7 +124,7 @@ EXTRA_DIST+=$(doc_DATA) # Generally useful flags AM_CPPFLAGS = -I $(srcdir)/util -I $(srcdir)/comms @ARCHDEF@ -AM_CFLAGS = -Wall +AM_CFLAGS = -Wall -Werror=format-security PLUG_FLAGS = -no-undefined -module -avoid-version diff --git a/NEWS b/NEWS index 9fc1129..dd93a1b 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ Bugs fixed: - #2633 local FS metris calculated inconsitently - #2664 no guest counter in /proc/stat on older kernels +- #2722 compile fails when -Werror=format-security flag is used Changes in Version 2.2.8 ======================== diff --git a/comms/rcctest.c b/comms/rcctest.c index 356ee61..2101f12 100644 --- a/comms/rcctest.c +++ b/comms/rcctest.c @@ -42,7 +42,7 @@ int main(int argc, char *argv[]) if (argc == 1) { gethostname((char*)&hostname,sizeof(hostname)); } else { - sprintf(hostname,argv[1]); + sprintf(hostname,"%s",argv[1]); } printf("Contacting %s\n",hostname); if (rcc_init(hostname,&port) < 0 ) { diff --git a/gatherctl.c b/gatherctl.c index 726c78c..dd59f32 100644 --- a/gatherctl.c +++ b/gatherctl.c @@ -146,5 +146,5 @@ static void printhelp() { int i; for (i=0;commands[i];i++) - printf(commands[i]); + printf("%s",commands[i]); } diff --git a/reposctl.c b/reposctl.c index 1a702ea..e3d2ddc 100644 --- a/reposctl.c +++ b/reposctl.c @@ -271,7 +271,7 @@ static void printhelp() { int i; for (i=0;commands[i];i++) - printf(commands[i]); + printf("%s",commands[i]); } static void printvalue(ValueRequest *vr) @@ -317,7 +317,7 @@ static void printvalue(ValueRequest *vr) printf("%f",*(double*)vr->vsValues[i].viValue); break; case MD_STRING: - printf(vr->vsValues[i].viValue); + printf("%s",vr->vsValues[i].viValue); break; default: printf("datatype %0x not supported",vr->vsDataType); diff --git a/util/mlog.c b/util/mlog.c index b1b078d..b202bc0 100644 --- a/util/mlog.c +++ b/util/mlog.c @@ -52,10 +52,10 @@ void m_log(int priority, int errout, const char *fmt, ...) va_start(ap,fmt); vsnprintf(buf,4096,fmt,ap); - syslog(priosysl,buf); + syslog(priosysl,"%s",buf); if (errout) { - fprintf(stderr,buf); + fprintf(stderr,"%s",buf); } va_end(ap); } hooks/post-receive -- gather - Metric Data Gatherer |