Changeset: f7e57c8f3571 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f7e57c8f3571
Modified Files:
        
Branch: sciql
Log Message:

merged with this branch


diffs (240 lines):

diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -613,7 +613,6 @@
        dnl X_CFLAGS="$X_CFLAGS -Waggregate-return"
        dnl X_CFLAGS="$X_CFLAGS -Wbad-function-cast"
        dnl X_CFLAGS="$X_CFLAGS -Wcast-qual"
-       dnl X_CFLAGS="$X_CFLAGS -Wc++-compat"
        dnl X_CFLAGS="$X_CFLAGS -Wconversion"
        dnl X_CFLAGS="$X_CFLAGS -Wdisabled-optimization"
        dnl X_CFLAGS="$X_CFLAGS -Wfloat-equal"
@@ -624,20 +623,31 @@
        dnl X_CFLAGS="$X_CFLAGS -Wmissing-prototypes"
        dnl X_CFLAGS="$X_CFLAGS -Wnested-externs"
        dnl X_CFLAGS="$X_CFLAGS -Wold-style-definition"
-       dnl X_CFLAGS="$X_CFLAGS -Woverlength-strings"
        dnl X_CFLAGS="$X_CFLAGS -Wpadded"
        dnl X_CFLAGS="$X_CFLAGS -Wredundant-decls"
        dnl X_CFLAGS="$X_CFLAGS -Wshadow"
-       dnl X_CFLAGS="$X_CFLAGS -Wsign-conversion"
-       dnl X_CFLAGS="$X_CFLAGS -Wstrict-overflow=5"
        dnl X_CFLAGS="$X_CFLAGS -Wstrict-prototypes"
        dnl X_CFLAGS="$X_CFLAGS -Wswitch-default"
        dnl X_CFLAGS="$X_CFLAGS -Wswitch-enum"
        dnl X_CFLAGS="$X_CFLAGS -Wtraditional"
        dnl X_CFLAGS="$X_CFLAGS -Wtraditional-conversion"
-       dnl X_CFLAGS="$X_CFLAGS -Wunsuffixed-float-constants"
-       dnl X_CFLAGS="$X_CFLAGS -Wvla"
        dnl X_CFLAGS="$X_CFLAGS -Wwrite-strings"
+       dnl case "$CC-$gcc_ver" in
+       dnl *clang*-*|*-3.[[5-9]].*|*-[[4-9]].*)
+       dnl     dnl gcc < 3.5 does not know these
+       dnl     X_CFLAGS="$X_CFLAGS -Wc++-compat"
+       dnl     X_CFLAGS="$X_CFLAGS -Woverlength-strings"
+       dnl     X_CFLAGS="$X_CFLAGS -Wsign-conversion"
+       dnl     X_CFLAGS="$X_CFLAGS -Wstrict-overflow=5"
+       dnl     X_CFLAGS="$X_CFLAGS -Wvla"
+       dnl     case "$gcc_ver" in
+       dnl     4.[[5-9]].*|[[5-9]].*)
+       dnl             dnl gcc < 4.5 does not know this
+       dnl             X_CFLAGS="$X_CFLAGS -Wunsuffixed-float-constants"
+       dnl             ;;
+       dnl     esac
+       dnl     ;;
+       dnl esac
 
        dnl  The default configure invocation when doing an rpmbuild also uses 
this
        case "$CC-$gcc_ver" in
@@ -753,16 +763,14 @@
        dnl  Be picky; "-Werror" seems to be too rigid for autoconf...
        CFLAGS="$CFLAGS -Wall -w2 -Wcheck"
        dnl  Be rigid; MonetDB code is supposed to adhere to this... ;-)
-       dnl  Let warning #266 "function declared implicitly" become an error.
-       X_CFLAGS="$X_CFLAGS -we266"
-       dnl  Let remark #181 "argument is incompatible with corresponding 
format string conversion" become an error.
-       X_CFLAGS="$X_CFLAGS -we181"
-       dnl  Let remark #810 "conversion from "." to "." may lose significant 
bits" become an error.
-       X_CFLAGS="$X_CFLAGS -we810"
-       dnl  Let remark #111 "statement is unreachable" become an error.
-       X_CFLAGS="$X_CFLAGS -we111"
-       dnl  Let remark #271: "trailing comma is nonstandard" become an error.
-       X_CFLAGS="$X_CFLAGS -we271"
+       dnl  Let the follows remarks and warning become errors:
+       dnl  #266: "function declared implicitly"
+       dnl  #181: "argument is incompatible with corresponding format string 
conversion"
+       dnl  #810: "conversion from "." to "." may lose significant bits"
+       dnl  #111: "statement is unreachable"
+       dnl  #271: "trailing comma is nonstandard"
+       dnl  #593: "variable "." was set but never used"
+       X_CFLAGS="$X_CFLAGS -we266,181,810,271,593"
        X_CFLAGS="$X_CFLAGS -Werror -Werror-all"
        dnl  ... however, some things aren't solved, yet:
        dnl  (for the time being,) we need to disable some warnings (making 
them remarks doesn't seem to work with -Werror):
diff --git a/sql/backends/monet5/datacell/actuator.c 
b/sql/backends/monet5/datacell/actuator.c
--- a/sql/backends/monet5/datacell/actuator.c
+++ b/sql/backends/monet5/datacell/actuator.c
@@ -200,7 +200,7 @@
 {
        int i;
        char *err = NULL;
-       char name[MYBUFSIZ + 1];
+       /*char name[MYBUFSIZ + 1];*/
        char hostname[1024];
        static SOCKET sockfd;
        Actuator ac = NULL;
@@ -326,7 +326,7 @@
 
 
        ac = ACnew(actuator);
-       name[0] = 0;
+       /*name[0] = 0;*/
        err = NULL;
        if ( mode == PASSIVE) {
                ac->fromServer = udp_rastream(host, port, actuator);
diff --git a/sql/backends/monet5/datacell/datacell.c 
b/sql/backends/monet5/datacell/datacell.c
--- a/sql/backends/monet5/datacell/datacell.c
+++ b/sql/backends/monet5/datacell/datacell.c
@@ -56,7 +56,7 @@
 #define DCINITIALIZED 2
 #define DCPAUSED 3
 
-static int DCprepared;
+/*static int DCprepared;*/
 
 /*
  * grab all tables in the datacell schema and turn them into baskets.
@@ -71,14 +71,14 @@
        backend *be;
        node *o;
        sql_func *f;
-       sql_trans *tr;
+       /*sql_trans *tr;*/
 
        if ( msg)
                return msg;
        s = mvc_bind_schema(m, schema);
        if (s == NULL)
                throw(SQL, "datacell.query", "Schema missing");
-       tr = m->session->tr;
+       /*tr = m->session->tr;*/
        for (o = s->funcs.set->h; o; o = o->next) {
                f = o->data;
                if ( strcmp(f->base.name, nme) == 0 ){
@@ -115,7 +115,7 @@
                f = o->data;
                printf("function %s\n", f->base.name);
        }
-       DCprepared = DCINITIALIZED;
+       /*DCprepared = DCINITIALIZED;*/
        (void) stk;
        (void) pci;
        return msg;
@@ -363,7 +363,7 @@
        (void) mb;
        (void) stk;
        (void) pci;
-       DCprepared = DCNONINITIALIZED;
+       /*DCprepared = DCNONINITIALIZED;*/
        return MAL_SUCCEED;
 }
 
@@ -399,5 +399,4 @@
 DCbeat(int *ret, str *bskt, int *beat)
 {
        return BSKTbeat(ret,bskt,beat);
-       return MAL_SUCCEED;
 }
diff --git a/sql/backends/monet5/datacell/opt_datacell.c 
b/sql/backends/monet5/datacell/opt_datacell.c
--- a/sql/backends/monet5/datacell/opt_datacell.c
+++ b/sql/backends/monet5/datacell/opt_datacell.c
@@ -42,14 +42,14 @@
 OPTdatacellImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr 
pci)
 {
        int actions = 0, fnd, mvc= 0;
-    int bskt, i, j, k, limit, vlimit, slimit;
+    int bskt, i, j, k, limit, /*vlimit,*/ slimit;
     InstrPtr r, p, *old;
        str  col;
        int maxbasket= 128, m=0,a=0;
-       char *tables[128];
-       char *appends[128];
-       InstrPtr q[128], qa[128];
-       lng clk,t;
+       char *tables[128] = {NULL};
+       char *appends[128] = {NULL};
+       InstrPtr q[128], qa[128] = {NULL};
+       lng clk/*,t*/;
        int *alias;
        char buf[BUFSIZ];
 
@@ -63,7 +63,7 @@
     old= mb->stmt;
     limit = mb->stop;
     slimit = mb->ssize;
-    vlimit = mb->vtop;
+    /*vlimit = mb->vtop;*/
     if ( newMalBlkStmt(mb, slimit) < 0)
         return 0;
 
@@ -235,7 +235,7 @@
                        "history,multiplex,accumulators,garbageCollector");
                /* extend the plan with the new optimizer pipe required */
                clk= GDKusec();
-               optimizerCheck(cntxt, mb, "optimizer.datacell", 1, t = 
(GDKusec() - clk), OPT_CHECK_ALL);
+               optimizerCheck(cntxt, mb, "optimizer.datacell", 1, /*t =*/ 
(GDKusec() - clk), OPT_CHECK_ALL);
                addtoMalBlkHistory(mb, "datacell");
        }
        GDKfree(alias);
diff --git a/sql/backends/monet5/datacell/petrinet.c 
b/sql/backends/monet5/datacell/petrinet.c
--- a/sql/backends/monet5/datacell/petrinet.c
+++ b/sql/backends/monet5/datacell/petrinet.c
@@ -55,7 +55,7 @@
 #define PNcontrolInfinit 1     /* infinit loop of PNController  */
 #define PNcontrolEnd 2         /* when all factories are disable PNController 
exits */
 
-static int controlRounds = PNcontrolInfinit;
+/*static int controlRounds = PNcontrolInfinit;*/
 
 static MT_Lock petriLock;
 
@@ -573,7 +573,7 @@
        if ( status != PNstopped )
                status = PNrunning;
        mal_unset_lock(petriLock,"pncontroller");
-       controlRounds = PNcontrolEnd;
+       /*controlRounds = PNcontrolEnd;*/
 
        PNcontroller(&s);
 
@@ -658,5 +658,4 @@
        if ( time) BBPreleaseref(time->batCacheid);
        if ( error) BBPreleaseref(error->batCacheid);
        throw(MAL,"datacell.queries",MAL_MALLOC_FAIL);
-       return MAL_SUCCEED;
 }
diff --git a/sql/backends/monet5/datacell/receptor.c 
b/sql/backends/monet5/datacell/receptor.c
--- a/sql/backends/monet5/datacell/receptor.c
+++ b/sql/backends/monet5/datacell/receptor.c
@@ -409,7 +409,10 @@
        size_t j;
        str e, he;
        str line = "\0";
-       int i, n, m = 0;
+       int i, n;
+#ifdef _DEBUG_RECEPTOR_
+       int m = 0;
+#endif
        buf[MYBUFSIZ] = 0; /* ensure null terminated string */
 
        if (rc->scenario) {
@@ -488,8 +491,8 @@
                        buf[n + 1] = 0;
 #ifdef _DEBUG_RECEPTOR_
                        mnstr_printf(RCout, "#Receptor buf [%d]:%s \n", n, buf);
+                       m = 0;
 #endif
-                       m = 0;
                        /* use trivial concurrency measure */
                        line = buf;
 
_______________________________________________
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to