Skip to content

Commit 92f1837

Browse files
committed
Fixed compilation warnings (while testing 32 bit builds)
1 parent cc8912f commit 92f1837

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

sql/item_func.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3918,7 +3918,7 @@ longlong Item_master_gtid_wait::val_int()
39183918
{
39193919
DBUG_ASSERT(fixed == 1);
39203920
longlong result= 0;
3921-
String *gtid_pos = args[0]->val_str(&value);
3921+
String *gtid_pos __attribute__((unused)) = args[0]->val_str(&value);
39223922

39233923
if (args[0]->null_value)
39243924
{

storage/connect/fmdlex.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ YY_DECL
529529
pp->Num = 0;
530530
if (pp->InFmt) {*pp->InFmt = '\0'; pp->InFmt[pp->Outsize -1] = '\0'; }
531531
if (pp->OutFmt) {*pp->OutFmt = '\0'; pp->OutFmt[pp->Outsize -1] = '\0'; }
532-
pp->Curp = pp->Format;
532+
pp->Curp = (char*) pp->Format;
533533
yy_init = 1; /* This is a new input */
534534

535535

storage/connect/tabmysql.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ bool MYSQLDEF::GetServerInfo(PGLOBAL g, const char *server_name)
124124
DBUG_RETURN(true);
125125
} // endif server
126126

127-
DBUG_PRINT("info", ("get_server_by_name returned server at %lx",
127+
DBUG_PRINT("info", ("get_server_by_name returned server at %zx",
128128
(size_t) server));
129129

130130
// TODO: We need to examine which of these can really be NULL

storage/maria/ma_test2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,8 +1006,8 @@ w_requests: %10lu\n\
10061006
writes: %10lu\n\
10071007
r_requests: %10lu\n\
10081008
reads: %10lu\n",
1009-
maria_pagecache->blocks_used,
1010-
maria_pagecache->global_blocks_changed,
1009+
(ulong) maria_pagecache->blocks_used,
1010+
(ulong) maria_pagecache->global_blocks_changed,
10111011
(ulong) maria_pagecache->global_cache_w_requests,
10121012
(ulong) maria_pagecache->global_cache_write,
10131013
(ulong) maria_pagecache->global_cache_r_requests,

storage/tokudb/PerconaFT/ft/loader/dbufio.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ dbufio_print(DBUFIO_FILESET bfs) {
566566
fprintf(stderr, "%s:%d bfs=%p", __FILE__, __LINE__, bfs);
567567
if (bfs->panic)
568568
fprintf(stderr, " panic=%d", bfs->panic_errno);
569-
fprintf(stderr, " N=%d %d %" PRIuMAX, bfs->N, bfs->n_not_done, bfs->bufsize);
569+
fprintf(stderr, " N=%d %d %" PRIuMAX, bfs->N, bfs->n_not_done, (uintmax_t) bfs->bufsize);
570570
for (int i = 0; i < bfs->N; i++) {
571571
struct dbufio_file *dbf = &bfs->files[i];
572572
if (dbf->error_code[0] || dbf->error_code[1])

storage/tokudb/PerconaFT/ft/serialize/ft_node-serialize.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ int toku_serialize_ftnode_to_memory(FTNODE node,
761761
// Zero the rest of the buffer
762762
memset(data + total_node_size, 0, total_buffer_size - total_node_size);
763763

764-
assert(curr_ptr - data == total_node_size);
764+
assert((uint32_t) (curr_ptr - data) == total_node_size);
765765
*bytes_to_write = data;
766766
*n_bytes_to_write = total_buffer_size;
767767
*n_uncompressed_bytes = total_uncompressed_size;
@@ -2699,7 +2699,7 @@ decompress_from_raw_block_into_rbuf(uint8_t *raw_block, size_t raw_block_size, s
26992699
// decompress all the compressed sub blocks into the uncompressed buffer
27002700
r = decompress_all_sub_blocks(n_sub_blocks, sub_block, compressed_data, uncompressed_data, num_cores, ft_pool);
27012701
if (r != 0) {
2702-
fprintf(stderr, "%s:%d block %" PRId64 " failed %d at %p size %lu\n", __FUNCTION__, __LINE__, blocknum.b, r, raw_block, raw_block_size);
2702+
fprintf(stderr, "%s:%d block %" PRId64 " failed %d at %p size %zu\n", __FUNCTION__, __LINE__, blocknum.b, r, raw_block, raw_block_size);
27032703
dump_bad_block(raw_block, raw_block_size);
27042704
goto exit;
27052705
}

storage/tokudb/PerconaFT/ft/txn/txn_manager.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -970,11 +970,11 @@ int toku_txn_manager_recover_root_txn (
970970
txn_manager->last_xid_seen_for_recover = curr_txn->txnid.parent_id64;
971971
// if we found the maximum number of prepared transactions we are
972972
// allowed to find, then break
973-
if (num_txns_returned >= count) {
973+
if ((long) num_txns_returned >= count) {
974974
break;
975975
}
976976
}
977-
invariant(num_txns_returned <= count);
977+
invariant((long) num_txns_returned <= count);
978978
*retp = num_txns_returned;
979979
ret_val = 0;
980980
exit:

0 commit comments

Comments
 (0)