fence-virt: Format string cleanup
Warn on non-literal format strings and cleanup. Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
This commit is contained in:
parent
bcfc5703d3
commit
b0aa3ad784
@ -2,7 +2,7 @@ CC=@CC@
|
||||
CXX=@CXX@
|
||||
|
||||
CFLAGS=@CFLAGS@
|
||||
CFLAGS+=-fPIC -Wall -Wstrict-prototypes -Wshadow -D_GNU_SOURCE
|
||||
CFLAGS+=-fPIC -Wall -Wformat=2 -Wstrict-prototypes -Wshadow -D_GNU_SOURCE
|
||||
|
||||
LEX=@LEX@
|
||||
YACC=@YACC@
|
||||
|
@ -31,11 +31,9 @@
|
||||
|
||||
/* Local includes */
|
||||
#include "xvm.h"
|
||||
#include "ip_lookup.h"
|
||||
#include "simple_auth.h"
|
||||
#include "options.h"
|
||||
#include "tcp.h"
|
||||
#include "mcast.h"
|
||||
#include "debug.h"
|
||||
#include "fdops.h"
|
||||
|
||||
|
@ -124,6 +124,7 @@ insert_entry(int sev, char *buf, int bufsz)
|
||||
}
|
||||
|
||||
|
||||
__attribute__((__format__ (__printf__, 2, 0)))
|
||||
void
|
||||
__wrap_syslog(int severity, const char *fmt, ...)
|
||||
{
|
||||
|
@ -42,7 +42,7 @@ config.c: y.tab.h config.l
|
||||
$(LEX) -oconfig.c config.l
|
||||
|
||||
%.o: %.c
|
||||
gcc $(CFLAGS) -c -o $@ $^ $(INCLUDES)
|
||||
$(CC) $(CFLAGS) -c -o $@ $^ $(INCLUDES)
|
||||
|
||||
clean:
|
||||
rm -f ${TARGETS} *~ *.o testprog config.tab.c config.tab.h config.c
|
||||
|
@ -358,7 +358,7 @@ cpg_start( const char *name,
|
||||
if (!name)
|
||||
return -1;
|
||||
|
||||
ret = snprintf(gname.value, sizeof(gname.value), name);
|
||||
ret = snprintf(gname.value, sizeof(gname.value), "%s", name);
|
||||
if (ret <= 0)
|
||||
return -1;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef _VIRT_SERIAL_H_
|
||||
#define _VIRT_SERIAL_H
|
||||
#ifndef __VIRT_SERIAL_H
|
||||
#define __VIRT_SERIAL_H
|
||||
|
||||
#include <sys/select.h>
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#ifndef __UIID_TEST_H
|
||||
#ifndef __UUID_TEST_H
|
||||
#define __UUID_TEST_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
Loading…
x
Reference in New Issue
Block a user