Increased warning level, fixed resulting warnings, changed std form c99 to gnu99

Sat, 15 Oct 2011 14:52:12 +0200

author
Mike Becker <universe@uap-core.de>
date
Sat, 15 Oct 2011 14:52:12 +0200
changeset 18
cae1294702aa
parent 17
5f43f733cc12
child 19
8bac9fd0629d

Increased warning level, fixed resulting warnings, changed std form c99 to gnu99

Makefile file | annotate | diff | comparison | revisions
scanner.c file | annotate | diff | comparison | revisions
--- a/Makefile	Thu Oct 06 00:06:30 2011 +0200
+++ b/Makefile	Sat Oct 15 14:52:12 2011 +0200
@@ -1,4 +1,5 @@
 CC = gcc
+CARG = -Wall -std=gnu99
 BUILDDIR = build/
 OBJ = $(shell ls | grep '\.c' | sed 's/^\([^.]*\)\.c$$/${BUILDDIR:/=\/}\1.o/g' | tr '\n' ' ')
 BIN = ${BUILDDIR}cline
@@ -25,7 +26,7 @@
 	mv cline.src cline.h
 
 ${BUILDDIR}%.o: %.c
-	${CC} -c -std=c99 -o ${BUILDDIR}$*.o $<
+	${CC} ${CARG} -c -o ${BUILDDIR}$*.o $<
 
 clean:
 	rm -f build/*
--- a/scanner.c	Thu Oct 06 00:06:30 2011 +0200
+++ b/scanner.c	Sat Oct 15 14:52:12 2011 +0200
@@ -12,9 +12,8 @@
 int scanDirectory(DIR *dir, const int spaces,
                   char* currdir, settings_t* settings) {
   DIR *subdir;
-  char* subdirname;
   struct dirent *entry;
-  int lines, digits, a;
+  int lines, a;
   int lineSum = 0;
 
   while ((entry = readdir(dir)) != NULL) {

mercurial