diff options
author | unknown <monty@mysql.com> | 2003-12-20 03:41:04 +0200 |
---|---|---|
committer | unknown <monty@mysql.com> | 2003-12-20 03:41:04 +0200 |
commit | 65c44414c21c21ce7b57bd672873558ec2ed3031 (patch) | |
tree | 7b73c477120c02f912fc4e2d5105e727385d6bc6 /innobase/mem | |
parent | aa2eb815d6453502889fafb8106bbe33c0632e73 (diff) | |
download | mariadb-git-65c44414c21c21ce7b57bd672873558ec2ed3031.tar.gz |
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
A after merge fix for last merge
innobase/btr/btr0btr.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/btr/btr0sea.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/buf/buf0buf.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/buf/buf0flu.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/buf/buf0lru.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/buf/buf0rea.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/com/com0shm.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/data/data0data.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/data/data0type.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/dict/dict0crea.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/dict/dict0dict.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/fil/fil0fil.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/fsp/fsp0fsp.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/fut/fut0lst.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/ha/ha0ha.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/ibuf/ibuf0ibuf.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/include/univ.i:
Disabled ut_sprintf/ut_fprintf. Not needed as all number arguments to printf are now casted
innobase/lock/lock0lock.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/log/log0log.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/log/log0recv.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/mem/mem0dbg.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/mem/mem0pool.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/mtr/mtr0log.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/mtr/mtr0mtr.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/os/os0file.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/os/os0sync.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/page/page0cur.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/page/page0page.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/read/read0read.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/rem/rem0cmp.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/rem/rem0rec.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/row/row0mysql.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
Heikki, please check the change of % to %%
innobase/row/row0sel.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/row/row0undo.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/srv/srv0srv.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/srv/srv0start.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/sync/sync0arr.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/sync/sync0rw.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/sync/sync0sync.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/trx/trx0purge.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/trx/trx0rec.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/trx/trx0roll.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/trx/trx0sys.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/trx/trx0trx.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/trx/trx0undo.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/usr/usr0sess.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/ut/ut0mem.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/ut/ut0ut.c:
Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
sql/sql_delete.cc:
After merge fix
Diffstat (limited to 'innobase/mem')
-rw-r--r-- | innobase/mem/mem0dbg.c | 30 | ||||
-rw-r--r-- | innobase/mem/mem0pool.c | 17 |
2 files changed, 25 insertions, 22 deletions
diff --git a/innobase/mem/mem0dbg.c b/innobase/mem/mem0dbg.c index 1ff44bd8967..004197a5b8e 100644 --- a/innobase/mem/mem0dbg.c +++ b/innobase/mem/mem0dbg.c @@ -333,7 +333,7 @@ mem_hash_remove( if (node == NULL) { printf( "Memory heap or buffer freed in %s line %lu did not exist.\n", - file_name, line); + file_name, (ulong) line); ut_error; } @@ -348,9 +348,10 @@ mem_hash_remove( if (error) { printf( "Inconsistency in memory heap or buffer n:o %lu created\n", - node->nth_heap); + (ulong) node->nth_heap); printf("in %s line %lu and tried to free in %s line %lu.\n", - node->file_name, node->line, file_name, line); + node->file_name, (ulong) node->line, + file_name, (ulong) line); printf( "Hex dump of 400 bytes around memory heap first block start:\n"); @@ -443,8 +444,8 @@ mem_heap_validate_or_print( && (mem_block_get_len(block) > UNIV_PAGE_SIZE)) { fprintf(stderr, -"InnoDB: Error: mem block %lx length %lu > UNIV_PAGE_SIZE\n", (ulint)block, - mem_block_get_len(block)); +"InnoDB: Error: mem block %lx length %lu > UNIV_PAGE_SIZE\n", (ulong) block, + (ulong) mem_block_get_len(block)); /* error */ return; @@ -556,7 +557,8 @@ mem_heap_print( &us_size, &phys_size, &n_blocks); printf( "\nheap type: %lu; size: user size %lu; physical size %lu; blocks %lu.\n", - heap->type, us_size, phys_size, n_blocks); + (ulong) heap->type, (ulong) us_size, + (ulong) phys_size, (ulong) n_blocks); ut_a(!error); } @@ -894,8 +896,8 @@ mem_analyze_corruption( if (*((ulint*)p) == MEM_BLOCK_MAGIC_N) { fprintf(stderr, "Mem block at - %lu, file %s, line %lu\n", - dist, p + sizeof(ulint), - *(ulint*)(p + 8 + sizeof(ulint))); + (ulong) dist, (p + sizeof(ulint)), + (ulong) (*(ulint*)(p + 8 + sizeof(ulint)))); break; } @@ -903,8 +905,8 @@ mem_analyze_corruption( if (*((ulint*)p) == MEM_FREED_BLOCK_MAGIC_N) { fprintf(stderr, "Freed mem block at - %lu, file %s, line %lu\n", - dist, p + sizeof(ulint), - *(ulint*)(p + 8 + sizeof(ulint))); + (ulong) dist, (p + sizeof(ulint)), + (ulong) (*(ulint*)(p + 8 + sizeof(ulint)))); break; } @@ -931,8 +933,8 @@ mem_analyze_corruption( if (*((ulint*)p) == MEM_BLOCK_MAGIC_N) { fprintf(stderr, "Mem block at + %lu, file %s, line %lu\n", - dist, p + sizeof(ulint), - *(ulint*)(p + 8 + sizeof(ulint))); + (ulong) dist, (p + sizeof(ulint)), + (ulong) (*(ulint*)(p + 8 + sizeof(ulint)))); break; } @@ -940,8 +942,8 @@ mem_analyze_corruption( if (*((ulint*)p) == MEM_FREED_BLOCK_MAGIC_N) { fprintf(stderr, "Freed mem block at + %lu, file %s, line %lu\n", - dist, p + sizeof(ulint), - *(ulint*)(p + 8 + sizeof(ulint))); + (ulong) dist, (p + sizeof(ulint)), + (ulong) (*(ulint*)(p + 8 + sizeof(ulint)))); break; } diff --git a/innobase/mem/mem0pool.c b/innobase/mem/mem0pool.c index 274daae1d4e..2817e1f12d4 100644 --- a/innobase/mem/mem0pool.c +++ b/innobase/mem/mem0pool.c @@ -279,7 +279,8 @@ mem_pool_fill_free_list( fprintf(stderr, " InnoDB: Error: mem pool free list %lu length is %lu\n" "InnoDB: though the list is empty!\n", - i + 1, UT_LIST_GET_LEN(pool->free_list[i + 1])); + (ulong) i + 1, + (ulong) UT_LIST_GET_LEN(pool->free_list[i + 1])); } ret = mem_pool_fill_free_list(i + 1, pool); @@ -360,7 +361,7 @@ mem_area_alloc( fprintf(stderr, "InnoDB: Error: Removing element from mem pool free list %lu though the\n" "InnoDB: element is not marked free!\n", - n); + (ulong) n); mem_analyze_corruption((byte*)area); @@ -380,7 +381,7 @@ mem_area_alloc( fprintf(stderr, "InnoDB: Error: Removing element from mem pool free list %lu\n" "InnoDB: though the list length is 0!\n", - n); + (ulong) n); mem_analyze_corruption((byte*)area); ut_a(0); @@ -504,7 +505,7 @@ mem_area_free( fprintf(stderr, "InnoDB: Error: Memory area size %lu, next area size %lu not a power of 2!\n" "InnoDB: Possibly a memory overrun of the buffer being freed here.\n", - size, next_size); + (ulong) size, (ulong) next_size); mem_analyze_corruption((byte*)area); ut_a(0); @@ -632,13 +633,13 @@ mem_pool_print_info( fprintf(outfile, "Free list length %lu for blocks of size %lu\n", - UT_LIST_GET_LEN(pool->free_list[i]), - ut_2_exp(i)); + (ulong) UT_LIST_GET_LEN(pool->free_list[i]), + (ulong) ut_2_exp(i)); } } - fprintf(outfile, "Pool size %lu, reserved %lu.\n", pool->size, - pool->reserved); + fprintf(outfile, "Pool size %lu, reserved %lu.\n", (ulong) pool->size, + (ulong) pool->reserved); mutex_exit(&(pool->mutex)); } |