Skip to content

Commit 3422505

Browse files
committed
safestringlib: Add -Wstrict-prototypes
Add -W strict-prototypes and resolve the resulting warnings. Add static where necessary, and convert non-prototypes into prototypes. Signed-off-by: Mark Rustad <[email protected]>
1 parent 060b94b commit 3422505

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

makefile

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ MKDIR_P = mkdir -p
33
CC=gcc
44
CFLAGS := -I${IDIR} -fstack-protector-strong -fPIE -fPIC -O2 -MMD
55
CFLAGS += -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wformat -Wformat-security
6+
CFLAGS += -Wmissing-prototypes -Wstrict-prototypes
67
LDFLAGS=-z noexecstack -z now
78

89
ODIR=obj

safeclib/snprintf_support.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
#define CHK_FORMAT(X,Y) (((X)==(Y))?1:0)
5656

5757

58-
unsigned int
58+
static unsigned int
5959
parse_format(const char *format, char pformatList[], unsigned int maxFormats)
6060
{
6161
unsigned int numFormats = 0;
@@ -202,7 +202,7 @@ parse_format(const char *format, char pformatList[], unsigned int maxFormats)
202202
return numFormats;
203203
}
204204

205-
unsigned int
205+
static unsigned int
206206
check_integer_format(const char format)
207207
{
208208
unsigned int retValue = 0; // default failure

0 commit comments

Comments
 (0)