Changeset: 1ac79b0f0f8f for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1ac79b0f0f8f
Modified Files:
monetdb5/optimizer/opt_iot.c
sql/backends/monet5/iot/basket.c
sql/backends/monet5/iot/basket.h
sql/backends/monet5/iot/petrinet.c
Branch: iot
Log Message:
Compilation issues
diffs (82 lines):
diff --git a/monetdb5/optimizer/opt_iot.c b/monetdb5/optimizer/opt_iot.c
--- a/monetdb5/optimizer/opt_iot.c
+++ b/monetdb5/optimizer/opt_iot.c
@@ -50,7 +50,7 @@ OPTiotImplementation(Client cntxt, MalBl
str tables[MAXBSKT];
int mvc[MAXBSKT];
int done[MAXBSKT]= {0};
- int btop=0, lastmvc;
+ int btop=0, lastmvc=0;
int noerror=0;
int cq= strncmp(getFunctionId(getInstrPtr(mb,0)),"cq",2) == 0;
char buf[256];
diff --git a/sql/backends/monet5/iot/basket.c b/sql/backends/monet5/iot/basket.c
--- a/sql/backends/monet5/iot/basket.c
+++ b/sql/backends/monet5/iot/basket.c
@@ -26,6 +26,7 @@
*/
#include "monetdb_config.h"
+#include <unistd.h>
#include "gdk.h"
#include "iot.h"
#include "basket.h"
@@ -384,7 +385,7 @@ BSKTimportInternal(Client cntxt, int bsk
break;
case TYPE_str:
while (fgets(line, MAXLINE, f) != 0){ //Use getline?
http://man7.org/linux/man-pages/man3/getline.3.html
- if ( line[i= strlen(line)-1] != '\n')
+ if ( line[i= (int) strlen(line)-1] != '\n')
msg=
createException(MAL,"iot.basket","string too long\n");
else{
line[i] = 0;
@@ -609,7 +610,7 @@ BSKTdump(void *ret)
BBPunfix(b->batCacheid);
}
- mnstr_printf(GDKout, "#baskets[%2d] %s.%s columns %d
threshold %d window=[%d,%d] time window=[" LLFMT "," LLFMT "] beat " LLFMT "
milliseconds" BUNFMT"\n",
+ mnstr_printf(GDKout, "#baskets[%2d] %s.%s columns
"BUNFMT" threshold %d window=[%d,%d] time window=[" LLFMT "," LLFMT "] beat "
LLFMT " milliseconds" BUNFMT"\n",
bskt,
baskets[bskt].schema_name,
baskets[bskt].table_name,
diff --git a/sql/backends/monet5/iot/basket.h b/sql/backends/monet5/iot/basket.h
--- a/sql/backends/monet5/iot/basket.h
+++ b/sql/backends/monet5/iot/basket.h
@@ -41,7 +41,7 @@ typedef struct{
int winsize, winstride; /* sliding window operations */
lng timeslice, timestride; /* temporal sliding window, determined by
first temporal component */
lng heartbeat; /* milliseconds delay between actions */
- int count; /* number of events available in basket */
+ BUN count; /* number of events available in basket */
/* statistics */
int status; /* (DE)ACTIVATE */
diff --git a/sql/backends/monet5/iot/petrinet.c
b/sql/backends/monet5/iot/petrinet.c
--- a/sql/backends/monet5/iot/petrinet.c
+++ b/sql/backends/monet5/iot/petrinet.c
@@ -296,14 +296,14 @@ str PNdump(void *ret)
mnstr_printf(PNout, "#%s\n", pnet[i].error);
for (k = 0; k < MAXBSKT && pnet[i].places[k]; k++){
idx = pnet[i].places[k];
- mnstr_printf(PNout, "#<--\t%s basket %d %d\n",
+ mnstr_printf(PNout, "#<--\t%s basket "BUNFMT" %d\n",
baskets[idx].table_name,
baskets[idx].count,
baskets[idx].status);
}
for (k = 0; k <MAXBSKT && pnet[i].targets[k]; k++){
idx = pnet[i].targets[k];
- mnstr_printf(PNout, "#-->\t%s basket %d %d\n",
+ mnstr_printf(PNout, "#-->\t%s basket "BUNFMT" %d\n",
baskets[idx].table_name,
baskets[idx].count,
baskets[idx].status);
@@ -434,7 +434,7 @@ PNscheduler(void *dummy)
}
} else
/* consider baskets that are properly filled */
- if (baskets[idx].threshold > baskets[idx].count
|| baskets[idx].count == 0){
+ if ( (BUN)baskets[idx].threshold >
baskets[idx].count || baskets[idx].count == 0){
pnet[i].enabled = 0;
break;
}
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list