[mw-devel] MW3 r1289 - in trunk/src: . server webclient

welshbyte at sucs.org welshbyte at sucs.org
Sat Nov 17 20:13:34 GMT 2012


Author: welshbyte
Date: 2012-11-17 20:13:34 +0000 (Sat, 17 Nov 2012)
New Revision: 1289

Modified:
   trunk/src/Makefile
   trunk/src/files.c
   trunk/src/main.c
   trunk/src/server/Makefile
   trunk/src/server/mwserv.c
   trunk/src/webclient/Makefile
Log:
Add -Wstrict-prototypes -Wpointer-arith and tidy up


Modified: trunk/src/Makefile
===================================================================
--- trunk/src/Makefile	2012-11-17 19:57:05 UTC (rev 1288)
+++ trunk/src/Makefile	2012-11-17 20:13:34 UTC (rev 1289)
@@ -11,7 +11,7 @@
 CFLAGS+=-I/usr/include/mozjs
 
 # cflags for standard 'cc' compiler
-CFLAGS+= -Wall -Wshadow -Wmissing-prototypes -Wno-strict-aliasing -pedantic -fpie -std=gnu99 -D_GNU_SOURCE
+CFLAGS+= -Wall -Wshadow -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wno-strict-aliasing -pedantic -fpie -std=gnu99 -D_GNU_SOURCE
 LDFLAGS+= -pie
 LDLIBS+= -lreadline -ltermcap -lcrypt -l$(JSLIB) -lsqlite3 -lcurl -lpthread -lgnutls-openssl -ljansson
 

Modified: trunk/src/files.c
===================================================================
--- trunk/src/files.c	2012-11-17 19:57:05 UTC (rev 1288)
+++ trunk/src/files.c	2012-11-17 20:13:34 UTC (rev 1289)
@@ -73,7 +73,7 @@
 	}
 }
 
-static int createuserfile()
+static int createuserfile(void)
 {
 	int fd;
 	fd = creat(USERFILE, 0600);
@@ -117,7 +117,7 @@
 	close(outfile);
 }
 
-static int createwhofile()
+static int createwhofile(void)
 {
 	int fd;
 	fd = creat(WHOFILE, 0644);

Modified: trunk/src/main.c
===================================================================
--- trunk/src/main.c	2012-11-17 19:57:05 UTC (rev 1288)
+++ trunk/src/main.c	2012-11-17 20:13:34 UTC (rev 1289)
@@ -154,7 +154,7 @@
 	current_rights = RIGHTS_BBS;
 }
 
-static void set_prompt()
+static void set_prompt(void)
 {
 	char pre[20];
 
@@ -273,7 +273,7 @@
 	}
 }
 
-static void enable_rl()
+static void enable_rl(void)
 {
 	if (inreadline) return;
 	set_prompt();

Modified: trunk/src/server/Makefile
===================================================================
--- trunk/src/server/Makefile	2012-11-17 19:57:05 UTC (rev 1288)
+++ trunk/src/server/Makefile	2012-11-17 20:13:34 UTC (rev 1289)
@@ -8,7 +8,7 @@
 HOMEPATH := $(libdir)/mw
 
 # cflags for standard 'cc' compiler
-CFLAGS= -Wall -Wshadow -Wmissing-prototypes -Wno-strict-aliasing -pedantic --std=gnu99 -D_GNU_SOURCE -I.. -I/usr/include/postgresql
+CFLAGS= -Wall -Wshadow -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wno-strict-aliasing -pedantic --std=gnu99 -D_GNU_SOURCE -I.. -I/usr/include/postgresql
 #LDFLAGS+= -pie
 
 # info strings, do not edit.

Modified: trunk/src/server/mwserv.c
===================================================================
--- trunk/src/server/mwserv.c	2012-11-17 19:57:05 UTC (rev 1288)
+++ trunk/src/server/mwserv.c	2012-11-17 20:13:34 UTC (rev 1289)
@@ -24,7 +24,7 @@
 	int help;
 };
 
-void usage(char *name)
+static void usage(char *name)
 {
 	printf("Usage:\n  %s [--help|-h][--port|-p <port>][--foreground|-f]\n", name);
 }

Modified: trunk/src/webclient/Makefile
===================================================================
--- trunk/src/webclient/Makefile	2012-11-17 19:57:05 UTC (rev 1288)
+++ trunk/src/webclient/Makefile	2012-11-17 20:13:34 UTC (rev 1289)
@@ -8,7 +8,7 @@
 HOMEPATH := $(libdir)/mw
 
 # cflags for standard 'cc' compiler
-CFLAGS= -Wall -Wshadow -Wmissing-prototypes -pedantic --std=gnu99 -D_GNU_SOURCE -I.. -I/usr/include/postgresql
+CFLAGS= -Wall -Wshadow -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -pedantic --std=gnu99 -D_GNU_SOURCE -I.. -I/usr/include/postgresql
 #LDFLAGS+= -pie
 
 # info strings, do not edit.




More information about the mw-devel mailing list