Commit e6a8e3d6 authored by Yoni Fogel's avatar Yoni Fogel

Addresses #1915 [t:1915] Fix several windows build issues, removed some warnings permanently

git-svn-id: file:///svn/toku/tokudb@13704 c7de825b-a66e-492c-adef-691d508d4ae1
parent 0270d060
......@@ -44,7 +44,7 @@ void toku_fifo_iterate (FIFO, void(*f)(bytevec key,ITEMLEN keylen,bytevec data,I
int typevar = e->type; \
XIDS xidsvar = &e->xids_s; \
bytevec keyvar = xids_get_end_of_array(xidsvar); \
bytevec datavar = keyvar + e->keylen; \
bytevec datavar = (const u_int8_t*)keyvar + e->keylen; \
body; \
} } while (0)
......
......@@ -74,7 +74,7 @@ void *
fifo_msg_get_key(FIFO_MSG fifo_msg) {
void * rval;
u_int32_t xidslen = fifo_msg_get_xids_size(fifo_msg);
rval = (void*)fifo_msg->xids_and_key_and_val + xidslen;
rval = (u_int8_t*)fifo_msg->xids_and_key_and_val + xidslen;
return rval;
}
......@@ -83,7 +83,7 @@ fifo_msg_get_val(FIFO_MSG fifo_msg) {
void * rval;
void * key = fifo_msg_get_key(fifo_msg);
u_int32_t keylen = fifo_msg_get_keylen(fifo_msg);
rval = key + keylen;
rval = (u_int8_t*)key + keylen;
return rval;
}
......@@ -118,25 +118,3 @@ fifo_msg_get_size_required(BRT_MSG brt_msg) {
return rval;
}
void
fifo_msg_from_brt_msg(FIFO_MSG fifo_msg, BRT_MSG brt_msg) {
u_int32_t keylen_host = brt_msg_get_keylen(brt_msg);
u_int32_t vallen_host = brt_msg_get_vallen(brt_msg);
fifo_msg->type = brt_msg_get_type(brt_msg);
fifo_msg->keylen = toku_htod32(keylen_host);
fifo_msg->vallen = toku_htod32(vallen_host);
//Copy XIDS
XIDS xids = brt_msg_get_xids(brt_msg);
XIDS xids_target = fifo_msg_get_xids(fifo_msg);
u_int32_t xidslen = xids_get_size(xids);
memcpy(xids_target, xids, xidslen);
//Copy Key
void *key = brt_msg_get_key(brt_msg);
void *key_target = fifo_msg_get_key(fifo_msg);
memcpy(key_target, key, keylen_host);
//Copy Val
void *val = brt_msg_get_val(brt_msg);
void *val_target = fifo_msg_get_val(fifo_msg);
memcpy(val_target, val, vallen_host);
}
......@@ -96,6 +96,7 @@ le10_provpair (TXNID xid, u_int32_t klen, void* kval, u_int32_t plen, void* pval
return 0;
}
#if 0 //Needed for upgrade (probably)
//TODO: #1125 FUNCTION NEEDED for upgrading?
static u_int32_t memsize_le10_committed (u_int32_t keylen, void *key __attribute__((__unused__)),
u_int32_t vallen, void *val __attribute__((__unused__))) {
......@@ -175,6 +176,7 @@ u_int32_t le10_disksize (LEAFENTRY le) {
#endif
return d;
}
#endif
void wbuf_LEAFENTRY(struct wbuf *w, LEAFENTRY le) {
wbuf_literal_bytes(w, le, leafentry_disksize(le));
......
......@@ -684,7 +684,7 @@ int toku_read_and_print_logmagic (FILE *f, u_int32_t *versionp) {
if (r!=4) {
return DB_BADFORMAT;
}
printf("tokulog v.%d\n", toku_dtoh32(version));
printf("tokulog v.%u\n", toku_dtoh32(version));
//version MUST be in network order regardless of disk order
*versionp=toku_ntohl(version);
}
......
......@@ -173,7 +173,7 @@ xids_get_size(XIDS xids){
u_int8_t num_stored_xids = xids->num_stored_xids;
rval = sizeof(*xids) + num_stored_xids * sizeof(xids->ids[0]);
return rval;
};
}
u_int32_t
xids_get_serialize_size(XIDS xids){
......@@ -182,7 +182,7 @@ xids_get_serialize_size(XIDS xids){
rval = 1 + //num stored xids
8 * num_stored_xids;
return rval;
};
}
void
toku_calc_more_murmur_xids (struct x1764 *mm, XIDS xids) {
......
......@@ -221,6 +221,9 @@ ifeq ($(CC),icc)
#Linux
ICC_NOWARN=-diag-disable #Need the space
endif
SKIP_WARNING += $(ICC_NOWARN)810 # Remove warnings about losing precision
SKIP_WARNING += $(ICC_NOWARN)94 # Allow arrays of length 0
SKIP_WARNING += $(ICC_NOWARN)118 # Allow void functions to return void functions
SKIP_WARNING += $(ICC_NOWARN)177 # Don't complain about static variables that are not used.
#SKIP_WARNING += $(ICC_NOWARN)188 # Don't complain about enumerated type mixed with another type.
SKIP_WARNING += $(ICC_NOWARN)589 # Don't complain about goto into a block that skips initializing variables. GCC catches the actual uninitialized variables.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment