Changeset: 6af9a4a262e3 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6af9a4a262e3
Modified Files:
gdk/gdk_bat.c
gdk/gdk_bbp.c
Branch: Apr2019
Log Message:
Remove checks that clang complains about.
diffs (47 lines):
diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c
--- a/gdk/gdk_bat.c
+++ b/gdk/gdk_bat.c
@@ -74,7 +74,6 @@ BATcreatedesc(oid hseq, int tt, bool hea
* Alloc space for the BAT and its dependent records.
*/
assert(tt >= 0);
- assert(role >= 0 && role < 32);
bn = GDKzalloc(sizeof(BAT));
@@ -181,7 +180,6 @@ COLnew(oid hseq, int tt, BUN cap, role_t
assert(hseq <= oid_nil);
assert(tt != TYPE_bat);
ERRORcheck((tt < 0) || (tt > GDKatomcnt), "COLnew:tt error\n", NULL);
- ERRORcheck(role < 0 || role >= 32, "COLnew:role error\n", NULL);
/* round up to multiple of BATTINY */
if (cap < BUN_MAX - BATTINY)
@@ -253,7 +251,6 @@ BATattach(int tt, const char *heapfile,
ERRORcheck(tt <= 0 , "BATattach: bad tail type (<=0)\n", NULL);
ERRORcheck(ATOMvarsized(tt) && ATOMstorage(tt) != TYPE_str, "BATattach:
bad tail type (varsized and not str)\n", NULL);
ERRORcheck(heapfile == NULL, "BATattach: bad heapfile name\n", NULL);
- ERRORcheck(role < 0 || role >= 32, "BATattach: role error\n", NULL);
if ((f = fopen(heapfile, "rb")) == NULL) {
GDKsyserror("BATattach: cannot open %s\n", heapfile);
diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c
--- a/gdk/gdk_bbp.c
+++ b/gdk/gdk_bbp.c
@@ -323,7 +323,6 @@ BBPselectfarm(role_t role, int type, enu
(void) type; /* may use in future */
(void) hptype; /* may use in future */
- assert(role >= 0 && role < 32);
#ifndef PERSISTENTHASH
if (hptype == hashheap)
role = TRANSIENT;
@@ -333,7 +332,7 @@ BBPselectfarm(role_t role, int type, enu
role = TRANSIENT;
#endif
for (i = 0; i < MAXFARMS; i++)
- if (BBPfarms[i].dirname && BBPfarms[i].roles & (1 << role))
+ if (BBPfarms[i].dirname && BBPfarms[i].roles & (1 << (int)
role))
return i;
/* must be able to find farms for TRANSIENT and PERSISTENT */
assert(role != TRANSIENT && role != PERSISTENT);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list