Changeset: 686ad406e9e0 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/686ad406e9e0
Modified Files:
sql/backends/monet5/rel_bin.c
sql/backends/monet5/sql_bincopyconvert.c
sql/backends/monet5/sql_bincopyfrom.c
Branch: copyintobinary
Log Message:
Fix warnings
diffs (91 lines):
diff --git a/sql/backends/monet5/rel_bin.c b/sql/backends/monet5/rel_bin.c
--- a/sql/backends/monet5/rel_bin.c
+++ b/sql/backends/monet5/rel_bin.c
@@ -5787,7 +5787,7 @@ rel2bin_truncate(backend *be, sql_rel *r
static ValPtr take_atom_arg(node **n, int expected_type) {
sql_exp *e = (*n)->data;
atom *a = e->l;
- assert(a->tpe.type->localtype == expected_type);
+ assert(a->tpe.type->localtype == expected_type); (void) expected_type;
assert(!a->isnull);
*n = (*n)->next;
return &a->data;
diff --git a/sql/backends/monet5/sql_bincopyconvert.c
b/sql/backends/monet5/sql_bincopyconvert.c
--- a/sql/backends/monet5/sql_bincopyconvert.c
+++ b/sql/backends/monet5/sql_bincopyconvert.c
@@ -34,7 +34,7 @@ validate_bit(void *dst_, void *src_, siz
static str
byteswap_sht(void *dst_, void *src_, size_t count, bool byteswap)
{
- assert(byteswap); // otherwise, why call us?
+ assert(byteswap); (void)byteswap; // otherwise, why call us?
sht *dst = dst_;
const sht *src = src_;
for (size_t i = 0; i < count; i++)
@@ -45,7 +45,7 @@ byteswap_sht(void *dst_, void *src_, siz
static str
byteswap_int(void *dst_, void *src_, size_t count, bool byteswap)
{
- assert(byteswap); // otherwise, why call us?
+ assert(byteswap); (void)byteswap; // otherwise, why call us?
int *dst = dst_;
const int *src = src_;
for (size_t i = 0; i < count; i++)
@@ -56,7 +56,7 @@ byteswap_int(void *dst_, void *src_, siz
static str
byteswap_lng(void *dst_, void *src_, size_t count, bool byteswap)
{
- assert(byteswap); // otherwise, why call us?
+ assert(byteswap); (void)byteswap; // otherwise, why call us?
lng *dst = dst_;
const lng *src = src_;
for (size_t i = 0; i < count; i++)
@@ -68,7 +68,7 @@ byteswap_lng(void *dst_, void *src_, siz
static str
byteswap_hge(void *dst_, void *src_, size_t count, bool byteswap)
{
- assert(byteswap); // otherwise, why call us?
+ assert(byteswap); (void)byteswap; // otherwise, why call us?
hge *dst = dst_;
const hge *src = src_;
for (size_t i = 0; i < count; i++)
@@ -84,7 +84,7 @@ byteswap_flt(void *dst_, void *src_, siz
assert(sizeof(uint32_t) == sizeof(flt));
assert(sizeof(struct { char dummy; uint32_t ui; }) >= sizeof(struct {
char dummy; flt f; }));
- assert(byteswap); // otherwise, why call us?
+ assert(byteswap); (void)byteswap; // otherwise, why call us?
int *dst = dst_;
const int *src = src_;
for (size_t i = 0; i < count; i++)
@@ -99,7 +99,7 @@ byteswap_dbl(void *dst_, void *src_, siz
assert(sizeof(uint64_t) == sizeof(dbl));
assert(sizeof(struct { char dummy; uint64_t ui; }) >= sizeof(struct {
char dummy; dbl f; }));
- assert(byteswap); // otherwise, why call us?
+ assert(byteswap); (void)byteswap; // otherwise, why call us?
lng *dst = dst_;
const lng *src = src_;
for (size_t i = 0; i < count; i++)
diff --git a/sql/backends/monet5/sql_bincopyfrom.c
b/sql/backends/monet5/sql_bincopyfrom.c
--- a/sql/backends/monet5/sql_bincopyfrom.c
+++ b/sql/backends/monet5/sql_bincopyfrom.c
@@ -217,7 +217,7 @@ import_column(backend *be, bat *ret, BUN
int eof_reached = -1; // 1 = read to the end; 0 = stopped reading
early; -1 = unset, a bug.
// This one is not managed by the end: block
- stream *s;
+ stream *s = NULL;
// Set safe values
*ret = 0;
@@ -325,8 +325,7 @@ end:
static str
dump_trivial(BAT *b, stream *s)
{
- int tpe = BATttype(b);
- assert(!ATOMvarsized(tpe));
+ assert(!ATOMvarsized(BATttype(b)));
return write_out(Tloc(b, 0), Tloc(b, BATcount(b)), s);
}
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]