Changeset: 044aa9102e00 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=044aa9102e00
Modified Files:
clients/mapiclient/mclient.c
clients/mapiclient/mnc.c
clients/mapiclient/stethoscope.c
clients/mapilib/mapi.c
configure.ag
monetdb5/extras/compiler/mal_compiler.mx
monetdb5/mal/mal.mx
monetdb5/mal/mal_authorize.mx
monetdb5/mal/mal_client.mx
monetdb5/mal/mal_debugger.mx
monetdb5/mal/mal_factory.mx
monetdb5/mal/mal_linker.mx
monetdb5/mal/mal_namespace.mx
monetdb5/mal/mal_parser.mx
monetdb5/mal/mal_profiler.mx
monetdb5/mal/mal_recycle.mx
monetdb5/mal/mal_scenario.mx
monetdb5/mal/mal_session.mx
monetdb5/modules/atoms/mtime.mx
monetdb5/modules/kernel/alarm.mx
monetdb5/modules/mal/bpm.mx
monetdb5/modules/mal/groupby.mx
monetdb5/modules/mal/mal_mapi.mx
monetdb5/modules/mal/statistics.mx
monetdb5/optimizer/opt_mapreduce.mx
monetdb5/optimizer/opt_octopus.mx
monetdb5/optimizer/opt_prelude.mx
monetdb5/optimizer/opt_statistics.mx
monetdb5/scheduler/run_octopus.mx
sql/common/sql_keyword.c
sql/server/sql_mvc.c
sql/storage/store.c
tools/merovingian/client/monetdb.c
tools/mserver/mserver5.c
Branch: Aug2011
Log Message:
Enabled -Wold-style-definition compiler flag.
diffs (truncated from 628 to 300 lines):
diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c
--- a/clients/mapiclient/mclient.c
+++ b/clients/mapiclient/mclient.c
@@ -283,14 +283,14 @@
static timertype th = 0;
static void
-timerHumanStop()
+timerHumanStop(void)
{
th = gettime();
}
static char htimbuf[32];
static char *
-timerHuman()
+timerHuman(void)
{
timertype t = th - t0;
diff --git a/clients/mapiclient/mnc.c b/clients/mapiclient/mnc.c
--- a/clients/mapiclient/mnc.c
+++ b/clients/mapiclient/mnc.c
@@ -68,7 +68,7 @@
static void
-usage()
+usage(void)
{
fprintf(stderr, "mnc [options] destination port\n");
fprintf(stderr, " -l | --listen listen for connection instead\n");
diff --git a/clients/mapiclient/stethoscope.c b/clients/mapiclient/stethoscope.c
--- a/clients/mapiclient/stethoscope.c
+++ b/clients/mapiclient/stethoscope.c
@@ -152,7 +152,7 @@
static wthread *thds = NULL;
static void
-usage()
+usage(void)
{
fprintf(stderr, "stethoscope [options] +[trace options]
{<mod>.<fcn>}\n");
fprintf(stderr, " -d | --dbname=<database_name>\n");
diff --git a/clients/mapilib/mapi.c b/clients/mapilib/mapi.c
--- a/clients/mapilib/mapi.c
+++ b/clients/mapilib/mapi.c
@@ -1274,7 +1274,7 @@
}
static long
-usec()
+usec(void)
{
#ifdef HAVE_GETTIMEOFDAY
struct timeval tp;
diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -564,6 +564,7 @@
X_CFLAGS="$X_CFLAGS -Wmissing-declarations"
X_CFLAGS="$X_CFLAGS -Wmissing-format-attribute"
X_CFLAGS="$X_CFLAGS -Wmissing-prototypes"
+ X_CFLAGS="$X_CFLAGS -Wold-style-definition"
X_CFLAGS="$X_CFLAGS -Wpacked"
X_CFLAGS="$X_CFLAGS -Wunknown-pragmas"
case "$CC-$gcc_ver" in
@@ -632,7 +633,6 @@
dnl X_CFLAGS="$X_CFLAGS -Winline"
dnl X_CFLAGS="$X_CFLAGS -Wmissing-noreturn"
dnl X_CFLAGS="$X_CFLAGS -Wnested-externs"
- dnl X_CFLAGS="$X_CFLAGS -Wold-style-definition"
dnl X_CFLAGS="$X_CFLAGS -Wpadded"
dnl X_CFLAGS="$X_CFLAGS -Wredundant-decls"
dnl X_CFLAGS="$X_CFLAGS -Wshadow"
diff --git a/monetdb5/extras/compiler/mal_compiler.mx
b/monetdb5/extras/compiler/mal_compiler.mx
--- a/monetdb5/extras/compiler/mal_compiler.mx
+++ b/monetdb5/extras/compiler/mal_compiler.mx
@@ -777,7 +777,7 @@
Dump the code produced in the standard output for ease of testing
@c
static void
-mccDump(){
+mccDump(void){
FILE *f;
int ch;
f= fopen(codefile,"r");
diff --git a/monetdb5/mal/mal.mx b/monetdb5/mal/mal.mx
--- a/monetdb5/mal/mal.mx
+++ b/monetdb5/mal/mal.mx
@@ -366,7 +366,7 @@
GDKfatal("Recompile with STRUCT_ALIGNED flag disabled\n");
#endif
}
-int mal_init(){
+int mal_init(void){
MT_lock_init( &mal_contextLock, "mal_contextLock");
MT_lock_init( &mal_remoteLock, "mal_remoteLock");
MT_lock_init( &mal_profileLock, "mal_profileLock");
diff --git a/monetdb5/mal/mal_authorize.mx b/monetdb5/mal/mal_authorize.mx
--- a/monetdb5/mal/mal_authorize.mx
+++ b/monetdb5/mal/mal_authorize.mx
@@ -159,7 +159,7 @@
}
static void
-AUTHcommit()
+AUTHcommit(void)
{
bat blist[3];
@@ -181,7 +181,7 @@
can only be done after the GDK kernel has been initialized.
@c
str
-AUTHinitTables() {
+AUTHinitTables(void) {
bat bid;
BAT *b;
int isNew = 1;
diff --git a/monetdb5/mal/mal_client.mx b/monetdb5/mal/mal_client.mx
--- a/monetdb5/mal/mal_client.mx
+++ b/monetdb5/mal/mal_client.mx
@@ -357,7 +357,7 @@
GDKfree(x);
}
-static Client MCnewClient()
+static Client MCnewClient(void)
{
Client c;
mal_set_lock(mal_contextLock, "newClient");
@@ -718,7 +718,7 @@
At the end of the server session all remaining structured are
explicitly released to simplify detection of memory leakage problems.
@c
-void MCcleanupClients(){
+void MCcleanupClients(void){
Client c;
for(c = mal_clients; c < mal_clients+MAL_MAXCLIENTS; c++) {
/* if( c->nspace){ freeModuleList(c->nspace); c->nspace=0;}*/
@@ -732,7 +732,7 @@
}
}
void
-MCexitPending()
+MCexitPending(void)
{
Client c;
@@ -768,7 +768,7 @@
Mapi connection. Moreover, the Mapi connection should disable the administrator
console.
@c
-int MCcountClients(){
+int MCcountClients(void){
int cnt=0;
Client c;
for(c = mal_clients; c < mal_clients+MAL_MAXCLIENTS; c++)
diff --git a/monetdb5/mal/mal_debugger.mx b/monetdb5/mal/mal_debugger.mx
--- a/monetdb5/mal/mal_debugger.mx
+++ b/monetdb5/mal/mal_debugger.mx
@@ -1557,7 +1557,7 @@
printStack(cntxt->fdout,mb,stk);
}
static int mdbSessionActive;
-int mdbSession(){
+int mdbSession(void){
return mdbSessionActive;
}
@-
diff --git a/monetdb5/mal/mal_factory.mx b/monetdb5/mal/mal_factory.mx
--- a/monetdb5/mal/mal_factory.mx
+++ b/monetdb5/mal/mal_factory.mx
@@ -306,7 +306,7 @@
mal_export Plant newPlant(MalBlkPtr mb);
int
-factoryHasFreeSpace(){
+factoryHasFreeSpace(void){
return lastPlant <MAXPLANTS-1;
}
static int
diff --git a/monetdb5/mal/mal_linker.mx b/monetdb5/mal/mal_linker.mx
--- a/monetdb5/mal/mal_linker.mx
+++ b/monetdb5/mal/mal_linker.mx
@@ -331,7 +331,7 @@
because they may still be in use.
@c
void
-unloadLibraries()
+unloadLibraries(void)
{
int i;
@@ -376,7 +376,7 @@
}
void
-initLibraries()
+initLibraries(void)
{
int i;
str msg;
diff --git a/monetdb5/mal/mal_namespace.mx b/monetdb5/mal/mal_namespace.mx
--- a/monetdb5/mal/mal_namespace.mx
+++ b/monetdb5/mal/mal_namespace.mx
@@ -128,7 +128,7 @@
#endif
}
-void initNamespace() {
+void initNamespace(void) {
namespace.nme= (str *) GDKzalloc(sizeof(str *) * MAXIDENTIFIERS);
namespace.link= (int *) GDKzalloc(sizeof(int) * MAXIDENTIFIERS);
namespace.hit= (int *) GDKzalloc(sizeof(int) * MAXIDENTIFIERS);
@@ -161,7 +161,7 @@
backup.nmetop= 256; /* hash overflow */
#endif
}
-void finishNamespace() {
+void finishNamespace(void) {
int i;
for(i=0;i<namespace.nmetop; i++) {
if( namespace.nme[i])
diff --git a/monetdb5/mal/mal_parser.mx b/monetdb5/mal/mal_parser.mx
--- a/monetdb5/mal/mal_parser.mx
+++ b/monetdb5/mal/mal_parser.mx
@@ -151,7 +151,7 @@
short idCharacter2[256];
void
-initParser()
+initParser(void)
{
int i;
diff --git a/monetdb5/mal/mal_profiler.mx b/monetdb5/mal/mal_profiler.mx
--- a/monetdb5/mal/mal_profiler.mx
+++ b/monetdb5/mal/mal_profiler.mx
@@ -1361,7 +1361,7 @@
}
lng
-getDiskWrites()
+getDiskWrites(void)
{
#ifdef HAVE_SYS_RESOURCE_H
struct rusage infoUsage;
@@ -1373,7 +1373,7 @@
}
lng
-getDiskReads()
+getDiskReads(void)
{
#ifdef HAVE_SYS_RESOURCE_H
struct rusage infoUsage;
@@ -1385,7 +1385,7 @@
}
lng
-getUserTime()
+getUserTime(void)
{
#ifdef HAVE_TIMES
struct tms newTms;
@@ -1397,7 +1397,7 @@
}
lng
-getSystemTime()
+getSystemTime(void)
{
#ifdef HAVE_TIMES
struct tms newTms;
@@ -1409,7 +1409,7 @@
}
lng
-getDiskSpace()
+getDiskSpace(void)
{
BAT *b;
int i;
diff --git a/monetdb5/mal/mal_recycle.mx b/monetdb5/mal/mal_recycle.mx
--- a/monetdb5/mal/mal_recycle.mx
+++ b/monetdb5/mal/mal_recycle.mx
@@ -323,7 +323,7 @@
}
}
-static void extendQPat()
+static void extendQPat(void)
{
int s, i;
QryStatPtr *old;
@@ -446,7 +446,7 @@
associated with the recycle MAL block without problems, because
the block is never executed.
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list