summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authorunknown <jani@ua141d10.elisa.omakaista.fi>2007-03-22 20:32:07 +0200
committerunknown <jani@ua141d10.elisa.omakaista.fi>2007-03-22 20:32:07 +0200
commit7eb3881bd8c6b5c8dc705558414dbbe444804694 (patch)
treeef00f793c494b2bc5628499d60a41d7f7d70aa76 /myisam
parent39333ba7f205950ce161c051f5487be76674e39e (diff)
downloadmariadb-git-7eb3881bd8c6b5c8dc705558414dbbe444804694.tar.gz
Fixed compiler warnings.
mysys/default.c: Fixed bug. ndb/src/mgmclient/CommandInterpreter.cpp: Added parenthesis around the expression. sql/mysqld.cc: Fixed compiler warnings. Added a missing component in options struct (bug). sql-common/my_time.c: Removed garbage. sql/sql_table.cc: A possible use of a variable uninitialized. support-files/compiler_warnings.supp: BitKeeper file /home/my/bk/mysql-4.1-main/support-files/compiler_warnings.supp
Diffstat (limited to 'myisam')
-rw-r--r--myisam/mi_close.c5
-rw-r--r--myisam/mi_delete.c11
-rw-r--r--myisam/mi_dynrec.c5
-rw-r--r--myisam/mi_keycache.c5
-rw-r--r--myisam/mi_page.c4
-rw-r--r--myisam/mi_statrec.c2
-rw-r--r--myisam/myisamchk.c1
7 files changed, 19 insertions, 14 deletions
diff --git a/myisam/mi_close.c b/myisam/mi_close.c
index 62f5617de1a..8a4f6ee7f5d 100644
--- a/myisam/mi_close.c
+++ b/myisam/mi_close.c
@@ -28,8 +28,9 @@ int mi_close(register MI_INFO *info)
int error=0,flag;
MYISAM_SHARE *share=info->s;
DBUG_ENTER("mi_close");
- DBUG_PRINT("enter",("base: %lx reopen: %u locks: %u",
- info,(uint) share->reopen, (uint) share->tot_locks));
+ DBUG_PRINT("enter",("base: 0x%lx reopen: %u locks: %u",
+ (long) info, (uint) share->reopen,
+ (uint) share->tot_locks));
pthread_mutex_lock(&THR_LOCK_myisam);
if (info->lock_type == F_EXTRA_LCK)
diff --git a/myisam/mi_delete.c b/myisam/mi_delete.c
index 9bbf10bc38a..76e6a9d7f91 100644
--- a/myisam/mi_delete.c
+++ b/myisam/mi_delete.c
@@ -152,7 +152,7 @@ static int _mi_ck_real_delete(register MI_INFO *info, MI_KEYDEF *keyinfo,
DBUG_PRINT("error",("Couldn't allocate memory"));
DBUG_RETURN(my_errno=ENOMEM);
}
- DBUG_PRINT("info",("root_page: %ld",old_root));
+ DBUG_PRINT("info",("root_page: %lu", (ulong) old_root));
if (!_mi_fetch_keypage(info,keyinfo,old_root,DFLT_INIT_HITS,root_buff,0))
{
error= -1;
@@ -392,7 +392,7 @@ static int del(register MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *key,
MYISAM_SHARE *share=info->s;
MI_KEY_PARAM s_temp;
DBUG_ENTER("del");
- DBUG_PRINT("enter",("leaf_page: %ld keypos: 0x%lx", leaf_page,
+ DBUG_PRINT("enter",("leaf_page: %lu keypos: 0x%lx", (ulong) leaf_page,
(ulong) keypos));
DBUG_DUMP("leaf_buff",(byte*) leaf_buff,mi_getint(leaf_buff));
@@ -579,7 +579,8 @@ static int underflow(register MI_INFO *info, register MI_KEYDEF *keyinfo,
else
{ /* Page is full */
endpos=anc_buff+anc_length;
- DBUG_PRINT("test",("anc_buff: %lx endpos: %lx",anc_buff,endpos));
+ DBUG_PRINT("test",("anc_buff: 0x%lx endpos: 0x%lx", (long) anc_buff,
+ (long) endpos));
if (keypos != anc_buff+2+key_reflength &&
!_mi_get_last_key(info,keyinfo,anc_buff,anc_key,keypos,&length))
goto err;
@@ -756,8 +757,8 @@ static uint remove_key(MI_KEYDEF *keyinfo, uint nod_flag,
int s_length;
uchar *start;
DBUG_ENTER("remove_key");
- DBUG_PRINT("enter",("keypos: %lx page_end: %lx",keypos,page_end));
-
+ DBUG_PRINT("enter",("keypos: 0x%lx page_end: 0x%lx", (long) keypos,
+ (long) page_end));
start=keypos;
if (!(keyinfo->flag &
(HA_PACK_KEY | HA_SPACE_PACK_USED | HA_VAR_LENGTH_KEY |
diff --git a/myisam/mi_dynrec.c b/myisam/mi_dynrec.c
index 260f461685e..7e57202c38d 100644
--- a/myisam/mi_dynrec.c
+++ b/myisam/mi_dynrec.c
@@ -1029,8 +1029,9 @@ ulong _mi_rec_unpack(register MI_INFO *info, register byte *to, byte *from,
DBUG_RETURN(found_length);
err:
my_errno=HA_ERR_RECORD_DELETED;
- DBUG_PRINT("error",("to_end: %lx -> %lx from_end: %lx -> %lx",
- to,to_end,from,from_end));
+ DBUG_PRINT("error",("to_end: 0x%lx -> 0x%lx from_end: 0x%lx -> 0x%lx",
+ (ulong) to, (ulong) to_end, (ulong) from,
+ (ulong) from_end));
DBUG_DUMP("from",(byte*) info->rec_buff,info->s->base.min_pack_length);
DBUG_RETURN(MY_FILE_ERROR);
} /* _mi_rec_unpack */
diff --git a/myisam/mi_keycache.c b/myisam/mi_keycache.c
index 99a2fd6db15..a1c4f841dd2 100644
--- a/myisam/mi_keycache.c
+++ b/myisam/mi_keycache.c
@@ -54,8 +54,9 @@ int mi_assign_to_key_cache(MI_INFO *info,
int error= 0;
MYISAM_SHARE* share= info->s;
DBUG_ENTER("mi_assign_to_key_cache");
- DBUG_PRINT("enter",("old_key_cache_handle: %lx new_key_cache_handle: %lx",
- share->key_cache, key_cache));
+ DBUG_PRINT("enter",
+ ("old_key_cache_handle: 0x%lx new_key_cache_handle: 0x%lx",
+ (long) share->key_cache, (long) key_cache));
/*
Skip operation if we didn't change key cache. This can happen if we
diff --git a/myisam/mi_page.c b/myisam/mi_page.c
index 16713c87e10..103f6f536f4 100644
--- a/myisam/mi_page.c
+++ b/myisam/mi_page.c
@@ -27,7 +27,7 @@ uchar *_mi_fetch_keypage(register MI_INFO *info, MI_KEYDEF *keyinfo,
uchar *tmp;
uint page_size;
DBUG_ENTER("_mi_fetch_keypage");
- DBUG_PRINT("enter",("page: %ld",page));
+ DBUG_PRINT("enter",("page: %ld", (long) page));
tmp=(uchar*) key_cache_read(info->s->key_cache,
info->s->kfile, page, level, (byte*) buff,
@@ -78,7 +78,7 @@ int _mi_write_keypage(register MI_INFO *info, register MI_KEYDEF *keyinfo,
my_errno=EINVAL;
DBUG_RETURN((-1));
}
- DBUG_PRINT("page",("write page at: %lu",(long) page,buff));
+ DBUG_PRINT("page",("write page at: %lu",(long) page));
DBUG_DUMP("buff",(byte*) buff,mi_getint(buff));
#endif
diff --git a/myisam/mi_statrec.c b/myisam/mi_statrec.c
index 8f5cde45e24..951d390ba4f 100644
--- a/myisam/mi_statrec.c
+++ b/myisam/mi_statrec.c
@@ -254,7 +254,7 @@ int _mi_read_rnd_static_record(MI_INFO *info, byte *buf,
if (filepos >= info->state->data_file_length)
{
DBUG_PRINT("test",("filepos: %ld (%ld) records: %ld del: %ld",
- filepos/share->base.reclength,filepos,
+ (long) filepos/share->base.reclength, (long) filepos,
info->state->records, info->state->del));
fast_mi_writeinfo(info);
DBUG_RETURN(my_errno=HA_ERR_END_OF_FILE);
diff --git a/myisam/myisamchk.c b/myisam/myisamchk.c
index 49e3ea0f142..962d6a0c383 100644
--- a/myisam/myisamchk.c
+++ b/myisam/myisamchk.c
@@ -721,6 +721,7 @@ get_one_option(int optid,
case 2:
method_conv= MI_STATS_METHOD_IGNORE_NULLS;
break;
+ default: assert(0); /* Impossible */
}
check_param.stats_method= method_conv;
break;