Commit 3543cdb4 authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul Committed by Yoni Fogel

Get rid of almost all compiler warnings in newbrt for icc, and also compiles...

Get rid of almost all compiler warnings in newbrt for icc, and also compiles with gcc.  Addresses #1185.

git-svn-id: file:///svn/tokudb.1131b+1080a+1185@6383 c7de825b-a66e-492c-adef-691d508d4ae1
parent 1249a988
...@@ -3068,12 +3068,14 @@ static inline void dbt_cleanup(DBT *dbt) { ...@@ -3068,12 +3068,14 @@ static inline void dbt_cleanup(DBT *dbt) {
} }
} }
static inline int brt_cursor_not_set(BRT_CURSOR cursor) { static BOOL brt_cursor_not_set(BRT_CURSOR cursor) {
return cursor->key.data == 0 || cursor->val.data == 0; return (BOOL)((cursor->key.data == 0)
||
(cursor->val.data == 0));
} }
BOOL toku_brt_cursor_uninitialized(BRT_CURSOR c) { BOOL toku_brt_cursor_uninitialized(BRT_CURSOR c) {
return (BOOL)(brt_cursor_not_set(c)); return brt_cursor_not_set(c);
} }
static inline void load_dbts_from_omt(BRT_CURSOR c, DBT *key, DBT *val) { static inline void load_dbts_from_omt(BRT_CURSOR c, DBT *key, DBT *val) {
......
...@@ -182,6 +182,6 @@ void toku_cachetable_verify (CACHETABLE t); ...@@ -182,6 +182,6 @@ void toku_cachetable_verify (CACHETABLE t);
void print_hash_histogram (void) __attribute__((__visibility__("default"))); void print_hash_histogram (void) __attribute__((__visibility__("default")));
// Useful for debugging. // Useful for debugging.
static unsigned long toku_get_maxrss(void) __attribute__((__visibility__("default"))); unsigned long toku_get_maxrss(void) __attribute__((__visibility__("default")));
#endif #endif
...@@ -822,11 +822,13 @@ TOKULOGGER toku_txn_logger (TOKUTXN txn) { ...@@ -822,11 +822,13 @@ TOKULOGGER toku_txn_logger (TOKUTXN txn) {
return txn ? txn->logger : 0; return txn ? txn->logger : 0;
} }
#if 0
static int static int
toku_abort_logentry_commit (struct logtype_commit *le __attribute__((__unused__)), TOKUTXN txn) { toku_abort_logentry_commit (struct logtype_commit *le __attribute__((__unused__)), TOKUTXN txn) {
toku_logger_panic(txn->logger, EINVAL); toku_logger_panic(txn->logger, EINVAL);
return EINVAL; return EINVAL;
} }
#endif
int toku_logger_abort(TOKUTXN txn) { int toku_logger_abort(TOKUTXN txn) {
//printf("%s:%d aborting\n", __FILE__, __LINE__); //printf("%s:%d aborting\n", __FILE__, __LINE__);
......
...@@ -439,6 +439,7 @@ toku_recover_setpivot (LSN lsn, FILENUM filenum, BLOCKNUM blocknum, u_int32_t ch ...@@ -439,6 +439,7 @@ toku_recover_setpivot (LSN lsn, FILENUM filenum, BLOCKNUM blocknum, u_int32_t ch
toku_free(pivotkey.data); toku_free(pivotkey.data);
} }
#if 0
static void static void
toku_recover_changechildfingerprint (LSN lsn, FILENUM filenum, BLOCKNUM blocknum, u_int32_t childnum, u_int32_t UU(oldfingerprint), u_int32_t newfingerprint) { toku_recover_changechildfingerprint (LSN lsn, FILENUM filenum, BLOCKNUM blocknum, u_int32_t childnum, u_int32_t UU(oldfingerprint), u_int32_t newfingerprint) {
struct cf_pair *pair = NULL; struct cf_pair *pair = NULL;
...@@ -457,8 +458,8 @@ toku_recover_changechildfingerprint (LSN lsn, FILENUM filenum, BLOCKNUM blocknum ...@@ -457,8 +458,8 @@ toku_recover_changechildfingerprint (LSN lsn, FILENUM filenum, BLOCKNUM blocknum
node->log_lsn = lsn; node->log_lsn = lsn;
r = toku_cachetable_unpin(pair->cf, blocknum, node->fullhash, 1, toku_serialize_brtnode_size(node)); r = toku_cachetable_unpin(pair->cf, blocknum, node->fullhash, 1, toku_serialize_brtnode_size(node));
assert(r==0); assert(r==0);
} }
#endif
static void static void
toku_recover_fopen (LSN UU(lsn), TXNID UU(txnid), BYTESTRING fname, FILENUM filenum) { toku_recover_fopen (LSN UU(lsn), TXNID UU(txnid), BYTESTRING fname, FILENUM filenum) {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
int verbose=0; int verbose=0;
static void static inline void
default_parse_args (int argc, const char *argv[]) { default_parse_args (int argc, const char *argv[]) {
const char *progname=argv[0]; const char *progname=argv[0];
argc--; argv++; argc--; argv++;
......
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