summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/mysqlbinlog.cc2
-rw-r--r--client/mysqldump.c2
-rw-r--r--client/sql_string.cc4
-rw-r--r--extra/perror.c4
-rw-r--r--heap/_check.c10
-rw-r--r--heap/hp_delete.c4
-rw-r--r--heap/hp_hash.c2
-rw-r--r--heap/hp_open.c7
-rw-r--r--heap/hp_rkey.c2
-rw-r--r--heap/hp_rrnd.c8
-rw-r--r--heap/hp_write.c6
-rw-r--r--include/raid.h4
-rw-r--r--isam/_dynrec.c4
-rw-r--r--isam/_page.c4
-rw-r--r--isam/_search.c15
-rw-r--r--isam/close.c6
-rw-r--r--isam/delete.c9
-rw-r--r--isam/open.c2
-rw-r--r--isam/rkey.c4
-rw-r--r--isam/sort.c2
-rw-r--r--isam/write.c14
-rw-r--r--libmysql/libmysql.c15
-rw-r--r--libmysqld/libmysqld.c2
-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
-rw-r--r--myisammrg/myrg_extra.c2
-rw-r--r--mysys/default.c2
-rw-r--r--mysys/hash.c16
-rw-r--r--mysys/list.c3
-rw-r--r--mysys/mf_iocache.c11
-rw-r--r--mysys/mf_keycache.c30
-rw-r--r--mysys/mf_keycaches.c4
-rw-r--r--mysys/my_alloc.c5
-rw-r--r--mysys/my_dup.c2
-rw-r--r--mysys/my_fopen.c6
-rw-r--r--mysys/my_fstream.c8
-rw-r--r--mysys/my_getwd.c3
-rw-r--r--mysys/my_handler.c5
-rw-r--r--mysys/my_lib.c2
-rw-r--r--mysys/my_lread.c4
-rw-r--r--mysys/my_lwrite.c4
-rw-r--r--mysys/my_malloc.c4
-rw-r--r--mysys/my_pread.c8
-rw-r--r--mysys/my_read.c4
-rw-r--r--mysys/my_realloc.c6
-rw-r--r--mysys/my_seek.c2
-rw-r--r--mysys/my_tempnam.c2
-rw-r--r--mysys/my_write.c2
-rw-r--r--mysys/raid.cc37
-rw-r--r--mysys/safemalloc.c10
-rw-r--r--mysys/thr_lock.c15
-rw-r--r--mysys/tree.c4
-rw-r--r--mysys/typelib.c2
-rw-r--r--ndb/src/mgmclient/CommandInterpreter.cpp4
-rw-r--r--regex/regexec.c3
-rw-r--r--sql-common/client.c12
-rw-r--r--sql-common/my_time.c2
-rw-r--r--sql/examples/ha_archive.cc3
-rw-r--r--sql/ha_innodb.cc4
-rw-r--r--sql/ha_ndbcluster.cc36
-rw-r--r--sql/item.cc2
-rw-r--r--sql/item_cmpfunc.cc6
-rw-r--r--sql/item_subselect.cc2
-rw-r--r--sql/log.cc4
-rw-r--r--sql/log_event.cc6
-rw-r--r--sql/mysqld.cc9
-rw-r--r--sql/net_serv.cc2
-rw-r--r--sql/opt_range.cc2
-rw-r--r--sql/slave.cc12
-rw-r--r--sql/sql_cache.cc22
-rw-r--r--sql/sql_class.cc12
-rw-r--r--sql/sql_delete.cc2
-rw-r--r--sql/sql_parse.cc8
-rw-r--r--sql/sql_prepare.cc2
-rw-r--r--sql/sql_repl.cc4
-rw-r--r--sql/sql_select.cc1
-rw-r--r--sql/sql_table.cc2
-rw-r--r--sql/sql_update.cc4
-rw-r--r--sql/strfunc.cc2
-rw-r--r--sql/table.cc2
-rw-r--r--sql/tztime.cc4
-rw-r--r--sql/unireg.cc4
-rw-r--r--support-files/compiler_warnings.supp56
-rw-r--r--tests/mysql_client_test.c5
89 files changed, 353 insertions, 254 deletions
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc
index 77240a2c750..3f3771e6441 100644
--- a/client/mysqlbinlog.cc
+++ b/client/mysqlbinlog.cc
@@ -834,7 +834,7 @@ static int dump_remote_log_entries(const char* logname)
}
if (len < 8 && net->read_pos[0] == 254)
break; // end of data
- DBUG_PRINT("info",( "len= %u, net->read_pos[5] = %d\n",
+ DBUG_PRINT("info",( "len: %lu net->read_pos[5]: %d\n",
len, net->read_pos[5]));
Log_event *ev = Log_event::read_log_event((const char*) net->read_pos + 1 ,
len - 1, &error_msg, old_format);
diff --git a/client/mysqldump.c b/client/mysqldump.c
index 3bf9fff1b86..e9d48f3edfa 100644
--- a/client/mysqldump.c
+++ b/client/mysqldump.c
@@ -2654,7 +2654,7 @@ int main(int argc, char **argv)
default_charset= (char *)mysql_universal_client_charset;
bzero((char*) &ignore_table, sizeof(ignore_table));
- MY_INIT("mysqldump");
+ MY_INIT(argv[0]);
if (get_options(&argc, &argv))
{
my_end(0);
diff --git a/client/sql_string.cc b/client/sql_string.cc
index 690997152f1..1f007fd3a17 100644
--- a/client/sql_string.cc
+++ b/client/sql_string.cc
@@ -103,7 +103,7 @@ bool String::set(longlong num, CHARSET_INFO *cs)
}
else
{
- str_length=cs->cset->snprintf(cs,Ptr,l,"%d",num);
+ str_length=cs->cset->snprintf(cs,Ptr,l,"%ld", (long) num);
}
str_charset=cs;
return FALSE;
@@ -121,7 +121,7 @@ bool String::set(ulonglong num, CHARSET_INFO *cs)
}
else
{
- str_length=cs->cset->snprintf(cs,Ptr,l,"%d",num);
+ str_length=cs->cset->snprintf(cs,Ptr,l,"%ld", (long) num);
}
str_charset=cs;
return FALSE;
diff --git a/extra/perror.c b/extra/perror.c
index 764f54eafe3..e5c256aadf3 100644
--- a/extra/perror.c
+++ b/extra/perror.c
@@ -253,7 +253,9 @@ int main(int argc,char *argv[])
'Unknown Error' (without regard to case).
*/
if (msg &&
- my_strnncoll(&my_charset_latin1, msg, 13, "Unknown Error", 13) &&
+ my_strnncoll(&my_charset_latin1,
+ (const uchar *) msg, 13,
+ (const uchar *) "Unknown Error", 13) &&
(!unknown_error || strcmp(msg, unknown_error)))
{
found=1;
diff --git a/heap/_check.c b/heap/_check.c
index ad432856a69..6540f46454b 100644
--- a/heap/_check.c
+++ b/heap/_check.c
@@ -87,7 +87,7 @@ int heap_check_heap(HP_INFO *info, my_bool print_status)
if (records != share->records || deleted != share->deleted)
{
- DBUG_PRINT("error",("Found rows: %lu (%lu) deleted %lu (%lu)",
+ DBUG_PRINT("error",("Found rows: %lu (%u) deleted %lu (%u)",
records, share->records, deleted, share->deleted));
error= 1;
}
@@ -123,7 +123,7 @@ static int check_one_key(HP_KEYDEF *keydef, uint keynr, ulong records,
blength, records))
!= i)
{
- DBUG_PRINT("error",("Record in wrong link: Link %d Record: %lx Record-link %d", i,hash_info->ptr_to_rec,rec_link));
+ DBUG_PRINT("error",("Record in wrong link: Link %d Record: %lx Record-link %d", i, (ulong) hash_info->ptr_to_rec, rec_link));
error=1;
}
else
@@ -135,12 +135,12 @@ static int check_one_key(HP_KEYDEF *keydef, uint keynr, ulong records,
}
if (found != records)
{
- DBUG_PRINT("error",("Found %ld of %ld records", found, records));
+ DBUG_PRINT("error",("Found %u of %ld records", found, records));
error=1;
}
if (keydef->hash_buckets != hash_buckets_found)
{
- DBUG_PRINT("error",("Found %ld buckets, stats shows %ld buckets",
+ DBUG_PRINT("error",("Found %u buckets, stats shows %ld buckets",
hash_buckets_found, keydef->hash_buckets));
error=1;
}
@@ -181,7 +181,7 @@ static int check_one_rb_key(HP_INFO *info, uint keynr, ulong records,
{
error= 1;
DBUG_PRINT("error",("Record in wrong link: key: %d Record: %lx\n",
- keynr, recpos));
+ keynr, (ulong) recpos));
}
else
found++;
diff --git a/heap/hp_delete.c b/heap/hp_delete.c
index 266a9da6ca3..2e57d6393e9 100644
--- a/heap/hp_delete.c
+++ b/heap/hp_delete.c
@@ -24,7 +24,7 @@ int heap_delete(HP_INFO *info, const byte *record)
HP_SHARE *share=info->s;
HP_KEYDEF *keydef, *end, *p_lastinx;
DBUG_ENTER("heap_delete");
- DBUG_PRINT("enter",("info: %lx record: %lx",info,record));
+ DBUG_PRINT("enter",("info: %lx record: %lx", (ulong) info, (ulong) record));
test_active(info);
@@ -143,7 +143,7 @@ int hp_delete_key(HP_INFO *info, register HP_KEYDEF *keyinfo,
info->current_hash_ptr=last_ptr;
info->current_ptr = last_ptr ? last_ptr->ptr_to_rec : 0;
DBUG_PRINT("info",("Corrected current_ptr to point at: %lx",
- info->current_ptr));
+ (ulong) info->current_ptr));
}
empty=pos;
if (gpos)
diff --git a/heap/hp_hash.c b/heap/hp_hash.c
index ee5b4958e62..8d2aa5e9fe9 100644
--- a/heap/hp_hash.c
+++ b/heap/hp_hash.c
@@ -120,7 +120,7 @@ byte *hp_search(HP_INFO *info, HP_KEYDEF *keyinfo, const byte *key,
{
switch (nextflag) {
case 0: /* Search after key */
- DBUG_PRINT("exit",("found key at %d",pos->ptr_to_rec));
+ DBUG_PRINT("exit",("found key at %lu", (ulong) pos->ptr_to_rec));
info->current_hash_ptr=pos;
DBUG_RETURN(info->current_ptr= pos->ptr_to_rec);
case 1: /* Search next */
diff --git a/heap/hp_open.c b/heap/hp_open.c
index 1fa832208fb..a51c458171e 100644
--- a/heap/hp_open.c
+++ b/heap/hp_open.c
@@ -63,8 +63,9 @@ HP_INFO *heap_open(const char *name, int mode)
#ifndef DBUG_OFF
info->opt_flag= READ_CHECK_USED; /* Check when changing */
#endif
- DBUG_PRINT("exit",("heap: %lx reclength: %d records_in_block: %d",
- info,share->reclength,share->block.records_in_block));
+ DBUG_PRINT("exit",("heap: 0x%lx reclength: %d records_in_block: %d",
+ (ulong) info, share->reclength,
+ share->block.records_in_block));
DBUG_RETURN(info);
}
@@ -82,7 +83,7 @@ HP_SHARE *hp_find_named_heap(const char *name)
info= (HP_SHARE*) pos->data;
if (!strcmp(name, info->name))
{
- DBUG_PRINT("exit", ("Old heap_database: %lx",info));
+ DBUG_PRINT("exit", ("Old heap_database: 0x%lx", (ulong) info));
DBUG_RETURN(info);
}
}
diff --git a/heap/hp_rkey.c b/heap/hp_rkey.c
index 2c23d9d721e..eac8dbd6903 100644
--- a/heap/hp_rkey.c
+++ b/heap/hp_rkey.c
@@ -23,7 +23,7 @@ int heap_rkey(HP_INFO *info, byte *record, int inx, const byte *key,
HP_SHARE *share= info->s;
HP_KEYDEF *keyinfo= share->keydef + inx;
DBUG_ENTER("heap_rkey");
- DBUG_PRINT("enter",("base: %lx inx: %d",info,inx));
+ DBUG_PRINT("enter",("base: 0x%lx inx: %d", (ulong) info, inx));
if ((uint) inx >= share->keys)
{
diff --git a/heap/hp_rrnd.c b/heap/hp_rrnd.c
index cce3ce24e51..51bbbfc141e 100644
--- a/heap/hp_rrnd.c
+++ b/heap/hp_rrnd.c
@@ -29,7 +29,7 @@ int heap_rrnd(register HP_INFO *info, byte *record, byte *pos)
{
HP_SHARE *share=info->s;
DBUG_ENTER("heap_rrnd");
- DBUG_PRINT("enter",("info: %lx pos: %lx",info,pos));
+ DBUG_PRINT("enter",("info: 0x%lx pos: 0x%lx", (ulong) info, (ulong) pos));
info->lastinx= -1;
if (!(info->current_ptr= pos))
@@ -44,7 +44,7 @@ int heap_rrnd(register HP_INFO *info, byte *record, byte *pos)
}
info->update=HA_STATE_PREV_FOUND | HA_STATE_NEXT_FOUND | HA_STATE_AKTIV;
memcpy(record,info->current_ptr,(size_t) share->reclength);
- DBUG_PRINT("exit",("found record at %lx",info->current_ptr));
+ DBUG_PRINT("exit",("found record at 0x%lx", (ulong) info->current_ptr));
info->current_hash_ptr=0; /* Can't use rnext */
DBUG_RETURN(0);
} /* heap_rrnd */
@@ -64,7 +64,7 @@ int heap_rrnd_old(register HP_INFO *info, byte *record, ulong pos)
{
HP_SHARE *share=info->s;
DBUG_ENTER("heap_rrnd");
- DBUG_PRINT("enter",("info: %lx pos: %ld",info,pos));
+ DBUG_PRINT("enter",("info: 0x%lx pos: %ld",info,pos));
info->lastinx= -1;
if (pos == (ulong) -1)
@@ -98,7 +98,7 @@ end:
}
info->update=HA_STATE_PREV_FOUND | HA_STATE_NEXT_FOUND | HA_STATE_AKTIV;
memcpy(record,info->current_ptr,(size_t) share->reclength);
- DBUG_PRINT("exit",("found record at %lx",info->current_ptr));
+ DBUG_PRINT("exit",("found record at 0x%lx",info->current_ptr));
info->current_hash_ptr=0; /* Can't use rnext */
DBUG_RETURN(0);
} /* heap_rrnd */
diff --git a/heap/hp_write.c b/heap/hp_write.c
index 841dda6264e..b79b03477f5 100644
--- a/heap/hp_write.c
+++ b/heap/hp_write.c
@@ -144,7 +144,7 @@ static byte *next_free_record_pos(HP_SHARE *info)
pos=info->del_link;
info->del_link= *((byte**) pos);
info->deleted--;
- DBUG_PRINT("exit",("Used old position: %lx",pos));
+ DBUG_PRINT("exit",("Used old position: 0x%lx", (ulong) pos));
DBUG_RETURN(pos);
}
if (!(block_pos=(info->records % info->block.records_in_block)))
@@ -159,8 +159,8 @@ static byte *next_free_record_pos(HP_SHARE *info)
DBUG_RETURN(NULL);
info->data_length+=length;
}
- DBUG_PRINT("exit",("Used new position: %lx",
- (byte*) info->block.level_info[0].last_blocks+block_pos*
+ DBUG_PRINT("exit",("Used new position: 0x%lx",
+ (ulong) info->block.level_info[0].last_blocks+block_pos*
info->block.recbuffer));
DBUG_RETURN((byte*) info->block.level_info[0].last_blocks+
block_pos*info->block.recbuffer);
diff --git a/include/raid.h b/include/raid.h
index c840afcbaab..ec27eccdf3e 100644
--- a/include/raid.h
+++ b/include/raid.h
@@ -141,7 +141,7 @@ class RaidFd {
inline void Calculate()
{
DBUG_ENTER("RaidFd::_Calculate");
- DBUG_PRINT("info",("_position: %lu _raid_chunksize: %d, _size: %lu",
+ DBUG_PRINT("info",("_position: %lu _raid_chunksize: %lu _size: %lu",
(ulong) _position, _raid_chunksize, (ulong) _size));
_total_block = (ulong) (_position / _raid_chunksize);
@@ -149,7 +149,7 @@ class RaidFd {
_remaining_bytes = (uint) (_raid_chunksize -
(_position - _total_block * _raid_chunksize));
DBUG_PRINT("info",
- ("_total_block: %d this_block: %d _remaining_bytes:%d",
+ ("_total_block: %lu this_block: %d _remaining_bytes: %d",
_total_block, _this_block, _remaining_bytes));
DBUG_VOID_RETURN;
}
diff --git a/isam/_dynrec.c b/isam/_dynrec.c
index 25fe01e23f2..c158068eb83 100644
--- a/isam/_dynrec.c
+++ b/isam/_dynrec.c
@@ -713,8 +713,8 @@ uint _nisam_rec_unpack(register N_INFO *info, register byte *to, byte *from,
DBUG_RETURN((info->packed_length=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",
+ (long) to, (long) to_end, (long) from, (long) from_end));
DBUG_DUMP("from",(byte*) info->rec_buff,info->s->base.min_pack_length);
DBUG_RETURN(MY_FILE_ERROR);
} /* _nisam_rec_unpack */
diff --git a/isam/_page.c b/isam/_page.c
index e31115e624f..36626ba186b 100644
--- a/isam/_page.c
+++ b/isam/_page.c
@@ -70,7 +70,7 @@ int _nisam_write_keypage(register N_INFO *info, register N_KEYDEF *keyinfo,
my_errno=EINVAL;
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,getint(buff));
#endif
@@ -138,6 +138,6 @@ ulong _nisam_new(register N_INFO *info, N_KEYDEF *keyinfo)
(uint) keyinfo->base.block_length,0))
pos= NI_POS_ERROR;
}
- DBUG_PRINT("exit",("Pos: %d",pos));
+ DBUG_PRINT("exit",("Pos: %lu", pos));
DBUG_RETURN(pos);
} /* _nisam_new */
diff --git a/isam/_search.c b/isam/_search.c
index fbffd6786e1..a2a3b096ea1 100644
--- a/isam/_search.c
+++ b/isam/_search.c
@@ -208,14 +208,15 @@ int _nisam_seq_search(N_INFO *info, register N_KEYDEF *keyinfo, uchar *page, uch
if ((flag=_nisam_key_cmp(keyinfo->seg,t_buff,key,key_len,comp_flag)) >= 0)
break;
#ifdef EXTRA_DEBUG
- DBUG_PRINT("loop",("page: %lx key: '%s' flag: %d",page,t_buff,flag));
+ DBUG_PRINT("loop",("page: 0x%lx key: '%s' flag: %d",
+ (long) page, t_buff, flag));
#endif
memcpy(buff,t_buff,length);
*ret_pos=page;
}
if (flag == 0)
memcpy(buff,t_buff,length); /* Result is first key */
- DBUG_PRINT("exit",("flag: %d ret_pos: %lx",flag,*ret_pos));
+ DBUG_PRINT("exit",("flag: %d ret_pos: 0x%lx", flag, (long) *ret_pos));
DBUG_RETURN(flag);
} /* _nisam_seq_search */
@@ -754,8 +755,8 @@ int _nisam_search_next(register N_INFO *info, register N_KEYDEF *keyinfo,
uint nod_flag;
uchar lastkey[N_MAX_KEY_BUFF];
DBUG_ENTER("_nisam_search_next");
- DBUG_PRINT("enter",("nextflag: %d lastpos: %d int_keypos: %lx",
- nextflag,info->lastpos,info->int_keypos));
+ DBUG_PRINT("enter",("nextflag: %u lastpos: %lu int_keypos: 0x%lx",
+ nextflag, info->lastpos, (long) info->int_keypos));
DBUG_EXECUTE("key",_nisam_print_key(DBUG_FILE,keyinfo->seg,key););
if ((nextflag & SEARCH_BIGGER && info->int_keypos >= info->int_maxpos) ||
@@ -807,7 +808,7 @@ int _nisam_search_next(register N_INFO *info, register N_KEYDEF *keyinfo,
VOID(_nisam_move_key(keyinfo,info->lastkey,lastkey));
VOID((*keyinfo->get_key)(keyinfo,nod_flag,&info->int_keypos,info->lastkey));
info->lastpos=_nisam_dpos(info,nod_flag,info->int_keypos);
- DBUG_PRINT("exit",("found key at %d",info->lastpos));
+ DBUG_PRINT("exit",("found key at %lu", info->lastpos));
DBUG_RETURN(0);
} /* _nisam_search_next */
@@ -845,7 +846,7 @@ int _nisam_search_first(register N_INFO *info, register N_KEYDEF *keyinfo, regis
info->page_changed=info->buff_used=0;
info->last_search_keypage=info->int_pos;
- DBUG_PRINT("exit",("found key at %d",info->lastpos));
+ DBUG_PRINT("exit",("found key at %lu", info->lastpos));
DBUG_RETURN(0);
} /* _nisam_search_first */
@@ -884,6 +885,6 @@ int _nisam_search_last(register N_INFO *info, register N_KEYDEF *keyinfo, regist
info->page_changed=info->buff_used=0;
info->last_search_keypage=info->int_pos;
- DBUG_PRINT("exit",("found key at %d",info->lastpos));
+ DBUG_PRINT("exit",("found key at %lu", info->lastpos));
DBUG_RETURN(0);
} /* _nisam_search_last */
diff --git a/isam/close.c b/isam/close.c
index 37425653a5d..59ab91d944e 100644
--- a/isam/close.c
+++ b/isam/close.c
@@ -23,9 +23,9 @@ int nisam_close(register N_INFO *info)
int error=0,flag;
ISAM_SHARE *share=info->s;
DBUG_ENTER("nisam_close");
- DBUG_PRINT("enter",("base: %lx reopen: %u locks: %u",
- info,(uint) share->reopen,
- (uint) (share->w_locks+share->r_locks)));
+ DBUG_PRINT("enter",("base: 0x%lx reopen: %u locks: %u",
+ (long) info, (uint) share->reopen,
+ (uint) (share->w_locks + share->r_locks)));
pthread_mutex_lock(&THR_LOCK_isam);
if (info->lock_type == F_EXTRA_LCK)
diff --git a/isam/delete.c b/isam/delete.c
index 5aa542561c1..d6dbd19bd53 100644
--- a/isam/delete.c
+++ b/isam/delete.c
@@ -258,7 +258,8 @@ static int del(register N_INFO *info, register N_KEYDEF *keyinfo, uchar *key,
ISAM_SHARE *share=info->s;
S_PARAM s_temp;
DBUG_ENTER("del");
- DBUG_PRINT("enter",("leaf_page: %ld keypos: %lx",leaf_page,keypos));
+ DBUG_PRINT("enter",("leaf_page: %ld keypos: 0x%lx",
+ (long) leaf_page, (long) keypos));
DBUG_DUMP("leaf_buff",(byte*) leaf_buff,getint(leaf_buff));
endpos=leaf_buff+getint(leaf_buff);
@@ -349,7 +350,8 @@ static int underflow(register N_INFO *info, register N_KEYDEF *keyinfo,
S_PARAM s_temp;
ISAM_SHARE *share=info->s;
DBUG_ENTER("underflow");
- DBUG_PRINT("enter",("leaf_page: %ld keypos: %lx",leaf_page,keypos));
+ DBUG_PRINT("enter",("leaf_page: %ld keypos: 0x%lx",
+ leaf_page, (long) keypos));
DBUG_DUMP("anc_buff",(byte*) anc_buff,getint(anc_buff));
DBUG_DUMP("leaf_buff",(byte*) leaf_buff,getint(leaf_buff));
@@ -558,7 +560,8 @@ static uint remove_key(N_KEYDEF *keyinfo, uint nod_flag,
int r_length,s_length,first,diff_flag;
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->base.flag & (HA_PACK_KEY | HA_SPACE_PACK_USED)))
diff --git a/isam/open.c b/isam/open.c
index be62fd86192..39c33c877af 100644
--- a/isam/open.c
+++ b/isam/open.c
@@ -116,7 +116,7 @@ N_INFO *nisam_open(const char *name, int mode, uint handle_locking)
HA_OPTION_TEMP_COMPRESS_RECORD))
{
DBUG_PRINT("error",("wrong options: 0x%lx",
- uint2korr(share->state.header.options)));
+ (long) uint2korr(share->state.header.options)));
my_errno=HA_ERR_OLD_FILE;
goto err;
}
diff --git a/isam/rkey.c b/isam/rkey.c
index bbe4576418b..ee7b9d3ad40 100644
--- a/isam/rkey.c
+++ b/isam/rkey.c
@@ -27,8 +27,8 @@ int nisam_rkey(N_INFO *info, byte *buf, int inx, const byte *key, uint key_len,
uchar *key_buff;
ISAM_SHARE *share=info->s;
DBUG_ENTER("nisam_rkey");
- DBUG_PRINT("enter",("base: %lx inx: %d search_flag: %d",
- info,inx,search_flag));
+ DBUG_PRINT("enter",("base: 0x%lx inx: %d search_flag: %d",
+ (long) info, inx, search_flag));
if ((inx = _nisam_check_index(info,inx)) < 0)
DBUG_RETURN(-1);
diff --git a/isam/sort.c b/isam/sort.c
index 5d13f8085d2..64dcb405157 100644
--- a/isam/sort.c
+++ b/isam/sort.c
@@ -542,7 +542,7 @@ my_string name;
#if O_TEMPORARY == 0 && !defined(CANT_DELETE_OPEN_FILES)
VOID(my_delete(name,MYF(MY_WME | ME_NOINPUT)));
#endif
- DBUG_PRINT("exit",("stream: %lx",stream));
+ DBUG_PRINT("exit",("stream: 0x%lx", (long) stream));
DBUG_RETURN (stream);
} /* opentemp */
diff --git a/isam/write.c b/isam/write.c
index f2c0d8dbc45..2147c7cd59e 100644
--- a/isam/write.c
+++ b/isam/write.c
@@ -226,7 +226,7 @@ int _nisam_insert(register N_INFO *info, register N_KEYDEF *keyinfo,
int key_offset;
S_PARAM s_temp;
DBUG_ENTER("_nisam_insert");
- DBUG_PRINT("enter",("key_pos: %lx",key_pos));
+ DBUG_PRINT("enter",("key_pos: 0x%lx", (long) key_pos));
DBUG_EXECUTE("key",_nisam_print_key(DBUG_FILE,keyinfo->seg,key););
nod_flag=test_if_nod(anc_buff);
@@ -243,8 +243,9 @@ int _nisam_insert(register N_INFO *info, register N_KEYDEF *keyinfo,
{
DBUG_PRINT("test",("t_length: %d ref_len: %d",
t_length,s_temp.ref_length));
- DBUG_PRINT("test",("n_ref_len: %d n_length: %d key: %lx",
- s_temp.n_ref_length,s_temp.n_length,s_temp.key));
+ DBUG_PRINT("test",("n_ref_len: %d n_length: %d key: 0x%lx",
+ s_temp.n_ref_length, s_temp.n_length,
+ (long) s_temp.key));
}
#endif
key_offset = (uint)(endpos-key_pos);
@@ -430,7 +431,7 @@ uint _nisam_get_pack_key_length(N_KEYDEF *keyinfo, uint nod_flag, uchar *key_pos
if (*start == *key_pos && diff_flag && start != key_end)
length++; /* One new pos for ref.len */
- DBUG_PRINT("test",("length: %d key_pos: %lx",length,key_pos));
+ DBUG_PRINT("test",("length: %d key_pos: 0x%lx",length,key_pos));
if (n_length != 128)
{ /* Not same key after */
key=start+ref_length;
@@ -597,7 +598,7 @@ _nisam_get_pack_key_length(N_KEYDEF *keyinfo,
if (*start == *key_pos && diff_flag && start != key_end)
length++; /* One new pos for ref.len */
}
- DBUG_PRINT("test",("length: %d key_pos: %lx",length,key_pos));
+ DBUG_PRINT("test",("length: %d key_pos: 0x%lx", length, (long) key_pos));
key=start+ref_length;
while (n_length > 0 && key < key_end && *key == *key_pos)
@@ -696,7 +697,8 @@ uchar *_nisam_find_half_pos(N_INFO *info, N_KEYDEF *keyinfo, uchar *page, uchar
VOID((*keyinfo->get_key)(keyinfo,nod_flag,&page,key));
} while (page < end);
- DBUG_PRINT("exit",("returns: %lx page: %lx half: %lx",lastpos,page,end));
+ DBUG_PRINT("exit",("returns: 0x%lx page: 0x%lx half: 0x%lx",
+ (long) lastpos, (long) page, (long) end));
DBUG_RETURN(lastpos);
} /* _nisam_find_half_pos */
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index e963c0e429c..3102476a803 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -2124,7 +2124,7 @@ mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, ulong length)
}
stmt->bind= stmt->params + stmt->param_count;
stmt->state= MYSQL_STMT_PREPARE_DONE;
- DBUG_PRINT("info", ("Parameter count: %ld", stmt->param_count));
+ DBUG_PRINT("info", ("Parameter count: %u", stmt->param_count));
DBUG_RETURN(0);
}
@@ -2461,9 +2461,10 @@ static my_bool store_param(MYSQL_STMT *stmt, MYSQL_BIND *param)
{
NET *net= &stmt->mysql->net;
DBUG_ENTER("store_param");
- DBUG_PRINT("enter",("type: %d, buffer:%lx, length: %lu is_null: %d",
+ DBUG_PRINT("enter",("type: %d buffer: 0x%lx length: %lu is_null: %d",
param->buffer_type,
- param->buffer ? param->buffer : "0", *param->length,
+ (long) (param->buffer ? param->buffer : NullS),
+ *param->length,
*param->is_null));
if (*param->is_null)
@@ -2499,7 +2500,7 @@ static my_bool execute(MYSQL_STMT *stmt, char *packet, ulong length)
my_bool res;
DBUG_ENTER("execute");
- DBUG_PRINT("enter",("packet: %s, length :%d",packet ? packet :" ", length));
+ DBUG_PRINT("enter",("packet: %s, length :%lu", packet ? packet : " ", length));
mysql->last_used_con= mysql;
int4store(buff, stmt->stmt_id); /* Send stmt id to server */
@@ -3239,8 +3240,8 @@ mysql_stmt_send_long_data(MYSQL_STMT *stmt, uint param_number,
MYSQL_BIND *param;
DBUG_ENTER("mysql_stmt_send_long_data");
DBUG_ASSERT(stmt != 0);
- DBUG_PRINT("enter",("param no : %d, data : %lx, length : %ld",
- param_number, data, length));
+ DBUG_PRINT("enter",("param no: %d data: 0x%lx length: %ld",
+ param_number, (ulong) data, length));
/*
We only need to check for stmt->param_count, if it's not null
@@ -3960,7 +3961,7 @@ my_bool STDCALL mysql_stmt_bind_result(MYSQL_STMT *stmt, MYSQL_BIND *bind)
ulong bind_count= stmt->field_count;
uint param_count= 0;
DBUG_ENTER("mysql_stmt_bind_result");
- DBUG_PRINT("enter",("field_count: %d", bind_count));
+ DBUG_PRINT("enter",("field_count: %lu", bind_count));
if (!bind_count)
{
diff --git a/libmysqld/libmysqld.c b/libmysqld/libmysqld.c
index 0b21d11df31..9e88085a616 100644
--- a/libmysqld/libmysqld.c
+++ b/libmysqld/libmysqld.c
@@ -191,7 +191,7 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
}
}
- DBUG_PRINT("exit",("Mysql handler: %lx",mysql));
+ DBUG_PRINT("exit",("Mysql handler: 0x%lx", (ulong) mysql));
DBUG_RETURN(mysql);
error:
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;
diff --git a/myisammrg/myrg_extra.c b/myisammrg/myrg_extra.c
index 62cf5f01aba..3f133780e23 100644
--- a/myisammrg/myrg_extra.c
+++ b/myisammrg/myrg_extra.c
@@ -28,7 +28,7 @@ int myrg_extra(MYRG_INFO *info,enum ha_extra_function function,
int error,save_error=0;
MYRG_TABLE *file;
DBUG_ENTER("myrg_extra");
- DBUG_PRINT("info",("function: %d",(ulong) function));
+ DBUG_PRINT("info",("function: %lu",(ulong) function));
if (function == HA_EXTRA_CACHE)
{
diff --git a/mysys/default.c b/mysys/default.c
index fadf6efbc5b..4c99ae4cbf9 100644
--- a/mysys/default.c
+++ b/mysys/default.c
@@ -491,7 +491,7 @@ static int search_default_file_with_ext(DYNAMIC_ARRAY *args, MEM_ROOT *alloc,
ext= fn_ext(search_file->name);
/* check extension */
- for (tmp_ext= (char**) f_extensions; *tmp_ext; *tmp_ext++)
+ for (tmp_ext= (char**) f_extensions; *tmp_ext; tmp_ext++)
{
if (!strcmp(ext, *tmp_ext))
break;
diff --git a/mysys/hash.c b/mysys/hash.c
index 75135a470c9..5d83dae0faa 100644
--- a/mysys/hash.c
+++ b/mysys/hash.c
@@ -53,7 +53,7 @@ _hash_init(HASH *hash,CHARSET_INFO *charset,
void (*free_element)(void*),uint flags CALLER_INFO_PROTO)
{
DBUG_ENTER("hash_init");
- DBUG_PRINT("enter",("hash: 0x%lx size: %d",hash,size));
+ DBUG_PRINT("enter",("hash: 0x%lx size: %d", (long) hash, size));
hash->records=0;
if (my_init_dynamic_array_ci(&hash->array,sizeof(HASH_LINK),size,0))
@@ -109,7 +109,7 @@ static inline void hash_free_elements(HASH *hash)
void hash_free(HASH *hash)
{
DBUG_ENTER("hash_free");
- DBUG_PRINT("enter",("hash: 0x%lxd",hash));
+ DBUG_PRINT("enter",("hash: 0x%lxd", (long) hash));
hash_free_elements(hash);
hash->free= 0;
@@ -129,7 +129,7 @@ void hash_free(HASH *hash)
void my_hash_reset(HASH *hash)
{
DBUG_ENTER("my_hash_reset");
- DBUG_PRINT("enter",("hash: 0x%lxd",hash));
+ DBUG_PRINT("enter",("hash: 0x%lxd", (long) hash));
hash_free_elements(hash);
reset_dynamic(&hash->array);
@@ -645,7 +645,9 @@ my_bool hash_check(HASH *hash)
if ((rec_link=hash_rec_mask(hash,hash_info,blength,records)) != i)
{
DBUG_PRINT("error",
- ("Record in wrong link at %d: Start %d Record: 0x%lx Record-link %d", idx,i,hash_info->data,rec_link));
+ ("Record in wrong link at %d: "
+ "Start %d Record: 0x%lx Record-link %d",
+ idx, i, (long) hash_info->data, rec_link));
error=1;
}
else
@@ -656,13 +658,13 @@ my_bool hash_check(HASH *hash)
}
if (found != records)
{
- DBUG_PRINT("error",("Found %ld of %ld records"));
+ DBUG_PRINT("error",("Found %u of %u records", found, records));
error=1;
}
if (records)
DBUG_PRINT("info",
- ("records: %ld seeks: %d max links: %d hitrate: %.2f",
- records,seek,max_links,(float) seek / (float) records));
+ ("records: %u seeks: %u max links: %d hitrate: %.2f",
+ records, seek, max_links, (float) seek / (float) records));
return error;
}
#endif
diff --git a/mysys/list.c b/mysys/list.c
index 480c1080a45..9755dbcde84 100644
--- a/mysys/list.c
+++ b/mysys/list.c
@@ -28,7 +28,8 @@
LIST *list_add(LIST *root, LIST *element)
{
DBUG_ENTER("list_add");
- DBUG_PRINT("enter",("root: 0x%lx element: %lx", root, element));
+ DBUG_PRINT("enter",("root: 0x%lx element: 0x%lx", (long) root,
+ (long) element));
if (root)
{
if (root->prev) /* If add in mid of list */
diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c
index a91002d3b4c..8bf9ad84e34 100644
--- a/mysys/mf_iocache.c
+++ b/mysys/mf_iocache.c
@@ -589,7 +589,9 @@ void init_io_cache_share(IO_CACHE *read_cache, IO_CACHE_SHARE *cshare,
DBUG_ENTER("init_io_cache_share");
DBUG_PRINT("io_cache_share", ("read_cache: 0x%lx share: 0x%lx "
"write_cache: 0x%lx threads: %u",
- read_cache, cshare, write_cache, num_threads));
+ (long) read_cache,
+ (long) cshare,
+ (long) write_cache, num_threads));
DBUG_ASSERT(num_threads > 1);
DBUG_ASSERT(read_cache->type == READ_CACHE);
@@ -651,7 +653,7 @@ void remove_io_thread(IO_CACHE *cache)
pthread_mutex_lock(&cshare->mutex);
DBUG_PRINT("io_cache_share", ("%s: 0x%lx",
(cache == cshare->source_cache) ?
- "writer" : "reader", cache));
+ "writer" : "reader", (long) cache));
/* Remove from share. */
total= --cshare->total_threads;
@@ -727,7 +729,8 @@ static int lock_io_cache(IO_CACHE *cache, my_off_t pos)
cshare->running_threads--;
DBUG_PRINT("io_cache_share", ("%s: 0x%lx pos: %lu running: %u",
(cache == cshare->source_cache) ?
- "writer" : "reader", cache, (ulong) pos,
+ "writer" : "reader",
+ (long) cache, (ulong) pos,
cshare->running_threads));
if (cshare->source_cache)
@@ -866,7 +869,7 @@ static void unlock_io_cache(IO_CACHE *cache)
DBUG_PRINT("io_cache_share", ("%s: 0x%lx pos: %lu running: %u",
(cache == cshare->source_cache) ?
"writer" : "reader",
- cache, (ulong) cshare->pos_in_file,
+ (long) cache, (ulong) cshare->pos_in_file,
cshare->total_threads));
cshare->running_threads= cshare->total_threads;
diff --git a/mysys/mf_keycache.c b/mysys/mf_keycache.c
index 88b5051c52b..8ce3a6dde5c 100644
--- a/mysys/mf_keycache.c
+++ b/mysys/mf_keycache.c
@@ -410,9 +410,9 @@ int init_key_cache(KEY_CACHE *keycache, uint key_cache_block_size,
DBUG_PRINT("exit",
("disk_blocks: %d block_root: 0x%lx hash_entries: %d\
hash_root: 0x%lx hash_links: %d hash_link_root: 0x%lx",
- keycache->disk_blocks, keycache->block_root,
- keycache->hash_entries, keycache->hash_root,
- keycache->hash_links, keycache->hash_link_root));
+ keycache->disk_blocks, (long) keycache->block_root,
+ keycache->hash_entries, (long) keycache->hash_root,
+ keycache->hash_links, (long) keycache->hash_link_root));
bzero((gptr) keycache->changed_blocks,
sizeof(keycache->changed_blocks[0]) * CHANGED_BLOCKS_HASH);
bzero((gptr) keycache->file_blocks,
@@ -613,7 +613,7 @@ void change_key_cache_param(KEY_CACHE *keycache, uint division_limit,
void end_key_cache(KEY_CACHE *keycache, my_bool cleanup)
{
DBUG_ENTER("end_key_cache");
- DBUG_PRINT("enter", ("key_cache: 0x%lx", keycache));
+ DBUG_PRINT("enter", ("key_cache: 0x%lx", (long) keycache));
if (!keycache->key_cache_inited)
DBUG_VOID_RETURN;
@@ -632,7 +632,7 @@ void end_key_cache(KEY_CACHE *keycache, my_bool cleanup)
keycache->blocks_changed= 0;
}
- DBUG_PRINT("status", ("used: %d changed: %d w_requests: %lu "
+ DBUG_PRINT("status", ("used: %lu changed: %lu w_requests: %lu "
"writes: %lu r_requests: %lu reads: %lu",
keycache->blocks_used, keycache->global_blocks_changed,
(ulong) keycache->global_cache_w_requests,
@@ -1058,7 +1058,7 @@ static void unreg_request(KEY_CACHE *keycache,
if (block->temperature == BLOCK_WARM)
keycache->warm_blocks--;
block->temperature= BLOCK_HOT;
- KEYCACHE_DBUG_PRINT("unreg_request", ("#warm_blocks=%u",
+ KEYCACHE_DBUG_PRINT("unreg_request", ("#warm_blocks: %lu",
keycache->warm_blocks));
}
link_block(keycache, block, hot, (my_bool)at_end);
@@ -1077,7 +1077,7 @@ static void unreg_request(KEY_CACHE *keycache,
keycache->warm_blocks++;
block->temperature= BLOCK_WARM;
}
- KEYCACHE_DBUG_PRINT("unreg_request", ("#warm_blocks=%u",
+ KEYCACHE_DBUG_PRINT("unreg_request", ("#warm_blocks: %lu",
keycache->warm_blocks));
}
}
@@ -1313,11 +1313,11 @@ static BLOCK_LINK *find_key_block(KEY_CACHE *keycache,
DBUG_ENTER("find_key_block");
KEYCACHE_THREAD_TRACE("find_key_block:begin");
- DBUG_PRINT("enter", ("fd: %u pos %lu wrmode: %lu",
- (uint) file, (ulong) filepos, (uint) wrmode));
- KEYCACHE_DBUG_PRINT("find_key_block", ("fd: %u pos: %lu wrmode: %lu",
+ DBUG_PRINT("enter", ("fd: %u pos: %lu wrmode: %d",
+ (uint) file, (ulong) filepos, wrmode));
+ KEYCACHE_DBUG_PRINT("find_key_block", ("fd: %u pos: %lu wrmode: %d",
(uint) file, (ulong) filepos,
- (uint) wrmode));
+ wrmode));
#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG)
DBUG_EXECUTE("check_keycache2",
test_key_cache(keycache, "start of find_key_block", 0););
@@ -1587,9 +1587,9 @@ restart:
KEYCACHE_DBUG_ASSERT(page_status != -1);
*page_st=page_status;
KEYCACHE_DBUG_PRINT("find_key_block",
- ("fd: %u pos %lu block->status %u page_status %lu",
+ ("fd: %u pos: %lu block->status: %u page_status: %d",
(uint) file, (ulong) filepos, block->status,
- (uint) page_status));
+ page_status));
#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG)
DBUG_EXECUTE("check_keycache2",
@@ -2274,7 +2274,7 @@ static int flush_key_blocks_int(KEY_CACHE *keycache,
BLOCK_LINK *cache_buff[FLUSH_CACHE],**cache;
int last_errno= 0;
DBUG_ENTER("flush_key_blocks_int");
- DBUG_PRINT("enter",("file: %d blocks_used: %d blocks_changed: %d",
+ DBUG_PRINT("enter",("file: %d blocks_used: %lu blocks_changed: %lu",
file, keycache->blocks_used, keycache->blocks_changed));
#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG)
@@ -2474,7 +2474,7 @@ int flush_key_blocks(KEY_CACHE *keycache,
{
int res;
DBUG_ENTER("flush_key_blocks");
- DBUG_PRINT("enter", ("keycache: 0x%lx", keycache));
+ DBUG_PRINT("enter", ("keycache: 0x%lx", (long) keycache));
if (keycache->disk_blocks <= 0)
DBUG_RETURN(0);
diff --git a/mysys/mf_keycaches.c b/mysys/mf_keycaches.c
index 38fef31fdd4..e5086014a27 100644
--- a/mysys/mf_keycaches.c
+++ b/mysys/mf_keycaches.c
@@ -159,7 +159,7 @@ static byte *safe_hash_search(SAFE_HASH *hash, const byte *key, uint length)
result= hash->default_value;
else
result= ((SAFE_HASH_ENTRY*) result)->data;
- DBUG_PRINT("exit",("data: 0x%lx", result));
+ DBUG_PRINT("exit",("data: 0x%lx", (long) result));
DBUG_RETURN(result);
}
@@ -190,7 +190,7 @@ static my_bool safe_hash_set(SAFE_HASH *hash, const byte *key, uint length,
SAFE_HASH_ENTRY *entry;
my_bool error= 0;
DBUG_ENTER("safe_hash_set");
- DBUG_PRINT("enter",("key: %.*s data: 0x%lx", length, key, data));
+ DBUG_PRINT("enter",("key: %.*s data: 0x%lx", length, key, (long) data));
rw_wrlock(&hash->mutex);
entry= (SAFE_HASH_ENTRY*) hash_search(&hash->hash, key, length);
diff --git a/mysys/my_alloc.c b/mysys/my_alloc.c
index d52a8efeed2..62fcbd491f9 100644
--- a/mysys/my_alloc.c
+++ b/mysys/my_alloc.c
@@ -47,7 +47,7 @@ void init_alloc_root(MEM_ROOT *mem_root, uint block_size,
uint pre_alloc_size __attribute__((unused)))
{
DBUG_ENTER("init_alloc_root");
- DBUG_PRINT("enter",("root: 0x%lx", mem_root));
+ DBUG_PRINT("enter",("root: 0x%lx", (long) mem_root));
mem_root->free= mem_root->used= mem_root->pre_alloc= 0;
mem_root->min_malloc= 32;
mem_root->block_size= block_size - ALLOC_ROOT_MIN_BLOCK_SIZE;
@@ -263,7 +263,8 @@ void free_root(MEM_ROOT *root, myf MyFlags)
{
reg1 USED_MEM *next,*old;
DBUG_ENTER("free_root");
- DBUG_PRINT("enter",("root: 0x%lx flags: %u", root, (uint) MyFlags));
+ DBUG_PRINT("enter",("root: 0x%lx flags: %u",
+ (long) root, (uint) MyFlags));
if (!root) /* QQ: Should be deleted */
DBUG_VOID_RETURN; /* purecov: inspected */
diff --git a/mysys/my_dup.c b/mysys/my_dup.c
index 4b7434e29ea..cdc15b3ebce 100644
--- a/mysys/my_dup.c
+++ b/mysys/my_dup.c
@@ -30,7 +30,7 @@ File my_dup(File file, myf MyFlags)
File fd;
const char *filename;
DBUG_ENTER("my_dup");
- DBUG_PRINT("my",("file: %d MyFlags: %d", MyFlags));
+ DBUG_PRINT("my",("file: %d MyFlags: %d", file, MyFlags));
fd = dup(file);
filename= (((uint) file < my_file_limit) ?
my_file_info[(int) file].name : "Unknown");
diff --git a/mysys/my_fopen.c b/mysys/my_fopen.c
index f07beec9f39..6e81d40a2d6 100644
--- a/mysys/my_fopen.c
+++ b/mysys/my_fopen.c
@@ -79,7 +79,7 @@ FILE *my_fopen(const char *filename, int flags, myf MyFlags)
my_stream_opened++;
my_file_info[fileno(fd)].type = STREAM_BY_FOPEN;
pthread_mutex_unlock(&THR_LOCK_open);
- DBUG_PRINT("exit",("stream: 0x%lx",fd));
+ DBUG_PRINT("exit",("stream: 0x%lx", (long) fd));
DBUG_RETURN(fd);
}
pthread_mutex_unlock(&THR_LOCK_open);
@@ -103,7 +103,7 @@ int my_fclose(FILE *fd, myf MyFlags)
{
int err,file;
DBUG_ENTER("my_fclose");
- DBUG_PRINT("my",("stream: 0x%lx MyFlags: %d",fd, MyFlags));
+ DBUG_PRINT("my",("stream: 0x%lx MyFlags: %d", (long) fd, MyFlags));
pthread_mutex_lock(&THR_LOCK_open);
file=fileno(fd);
@@ -163,7 +163,7 @@ FILE *my_fdopen(File Filedes, const char *name, int Flags, myf MyFlags)
pthread_mutex_unlock(&THR_LOCK_open);
}
- DBUG_PRINT("exit",("stream: 0x%lx",fd));
+ DBUG_PRINT("exit",("stream: 0x%lx", (long) fd));
DBUG_RETURN(fd);
} /* my_fdopen */
diff --git a/mysys/my_fstream.c b/mysys/my_fstream.c
index 5b17e3ff51c..7ac2cc0d89e 100644
--- a/mysys/my_fstream.c
+++ b/mysys/my_fstream.c
@@ -40,7 +40,7 @@ uint my_fread(FILE *stream, byte *Buffer, uint Count, myf MyFlags)
uint readbytes;
DBUG_ENTER("my_fread");
DBUG_PRINT("my",("stream: 0x%lx Buffer: 0x%lx Count: %u MyFlags: %d",
- stream, Buffer, Count, MyFlags));
+ (long) stream, (long) Buffer, Count, MyFlags));
if ((readbytes = (uint) fread(Buffer,sizeof(char),(size_t) Count,stream))
!= Count)
@@ -81,7 +81,7 @@ uint my_fwrite(FILE *stream, const byte *Buffer, uint Count, myf MyFlags)
#endif
DBUG_ENTER("my_fwrite");
DBUG_PRINT("my",("stream: 0x%lx Buffer: 0x%lx Count: %u MyFlags: %d",
- stream, Buffer, Count, MyFlags));
+ (long) stream, (long) Buffer, Count, MyFlags));
#if !defined(NO_BACKGROUND) && defined(USE_MY_STREAM)
errors=0;
@@ -153,7 +153,7 @@ my_off_t my_fseek(FILE *stream, my_off_t pos, int whence,
{
DBUG_ENTER("my_fseek");
DBUG_PRINT("my",("stream: 0x%lx pos: %lu whence: %d MyFlags: %d",
- stream, pos, whence, MyFlags));
+ (long) stream, (ulong) pos, whence, MyFlags));
DBUG_RETURN(fseek(stream, (off_t) pos, whence) ?
MY_FILEPOS_ERROR : (my_off_t) ftell(stream));
} /* my_seek */
@@ -166,7 +166,7 @@ my_off_t my_ftell(FILE *stream, myf MyFlags __attribute__((unused)))
{
off_t pos;
DBUG_ENTER("my_ftell");
- DBUG_PRINT("my",("stream: 0x%lx MyFlags: %d",stream, MyFlags));
+ DBUG_PRINT("my",("stream: 0x%lx MyFlags: %d", (long) stream, MyFlags));
pos=ftell(stream);
DBUG_PRINT("exit",("ftell: %lu",(ulong) pos));
DBUG_RETURN((my_off_t) pos);
diff --git a/mysys/my_getwd.c b/mysys/my_getwd.c
index 5663ceaa60e..9c9b9cf7bbb 100644
--- a/mysys/my_getwd.c
+++ b/mysys/my_getwd.c
@@ -45,7 +45,8 @@ int my_getwd(my_string buf, uint size, myf MyFlags)
{
my_string pos;
DBUG_ENTER("my_getwd");
- DBUG_PRINT("my",("buf: 0x%lx size: %d MyFlags %d", buf,size,MyFlags));
+ DBUG_PRINT("my",("buf: 0x%lx size: %d MyFlags %d",
+ (long) buf, size, MyFlags));
#if ! defined(MSDOS)
if (curr_dir[0]) /* Current pos is saved here */
diff --git a/mysys/my_handler.c b/mysys/my_handler.c
index 156e7892580..3d90b7f892a 100644
--- a/mysys/my_handler.c
+++ b/mysys/my_handler.c
@@ -543,8 +543,11 @@ HA_KEYSEG *ha_find_null(HA_KEYSEG *keyseg, uchar *a)
case HA_KEYTYPE_DOUBLE:
a= end;
break;
+ case HA_KEYTYPE_END: /* purecov: inspected */
+ /* keep compiler happy */
+ DBUG_ASSERT(0);
+ break;
}
}
return keyseg;
}
-
diff --git a/mysys/my_lib.c b/mysys/my_lib.c
index 1908c70f407..41bfbc83b35 100644
--- a/mysys/my_lib.c
+++ b/mysys/my_lib.c
@@ -625,7 +625,7 @@ MY_STAT *my_stat(const char *path, MY_STAT *stat_area, myf my_flags)
int m_used;
DBUG_ENTER("my_stat");
DBUG_PRINT("my", ("path: '%s', stat_area: 0x%lx, MyFlags: %d", path,
- (byte *) stat_area, my_flags));
+ (long) stat_area, my_flags));
if ((m_used= (stat_area == NULL)))
if (!(stat_area = (MY_STAT *) my_malloc(sizeof(MY_STAT), my_flags)))
diff --git a/mysys/my_lread.c b/mysys/my_lread.c
index a96febe4474..02ed3b5d213 100644
--- a/mysys/my_lread.c
+++ b/mysys/my_lread.c
@@ -27,8 +27,8 @@ uint32 my_lread(int Filedes, byte *Buffer, uint32 Count, myf MyFlags)
{
uint32 readbytes;
DBUG_ENTER("my_lread");
- DBUG_PRINT("my",("Fd: %d Buffer: %ld Count: %ld MyFlags: %d",
- Filedes, Buffer, Count, MyFlags));
+ DBUG_PRINT("my",("Fd: %d Buffer: 0x%lx Count: %u MyFlags: %d",
+ Filedes, (long) Buffer, Count, MyFlags));
DBUG_PRINT("error", ("Deprecated my_lread() function should not be used."));
diff --git a/mysys/my_lwrite.c b/mysys/my_lwrite.c
index 02c56a69ba4..f012e9d6a85 100644
--- a/mysys/my_lwrite.c
+++ b/mysys/my_lwrite.c
@@ -23,8 +23,8 @@ uint32 my_lwrite(int Filedes, const byte *Buffer, uint32 Count, myf MyFlags)
{
uint32 writenbytes;
DBUG_ENTER("my_lwrite");
- DBUG_PRINT("my",("Fd: %d Buffer: 0x%lx Count: %ld MyFlags: %d",
- Filedes, Buffer, Count, MyFlags));
+ DBUG_PRINT("my",("Fd: %d Buffer: 0x%lx Count: %u MyFlags: %d",
+ Filedes, (long) Buffer, Count, MyFlags));
DBUG_PRINT("error", ("Deprecated my_lwrite() function should not be used."));
diff --git a/mysys/my_malloc.c b/mysys/my_malloc.c
index 3f601a42dc9..a146b9ddd27 100644
--- a/mysys/my_malloc.c
+++ b/mysys/my_malloc.c
@@ -44,7 +44,7 @@ gptr my_malloc(unsigned int size, myf my_flags)
}
else if (my_flags & MY_ZEROFILL)
bzero(point,size);
- DBUG_PRINT("exit",("ptr: 0x%lx",point));
+ DBUG_PRINT("exit",("ptr: 0x%lx", (long) point));
DBUG_RETURN(point);
} /* my_malloc */
@@ -55,7 +55,7 @@ gptr my_malloc(unsigned int size, myf my_flags)
void my_no_flags_free(gptr ptr)
{
DBUG_ENTER("my_free");
- DBUG_PRINT("my",("ptr: 0x%lx",ptr));
+ DBUG_PRINT("my",("ptr: 0x%lx", (long) ptr));
if (ptr)
free(ptr);
DBUG_VOID_RETURN;
diff --git a/mysys/my_pread.c b/mysys/my_pread.c
index f378d548731..f4218fac65f 100644
--- a/mysys/my_pread.c
+++ b/mysys/my_pread.c
@@ -30,7 +30,7 @@ uint my_pread(File Filedes, byte *Buffer, uint Count, my_off_t offset,
int error;
DBUG_ENTER("my_pread");
DBUG_PRINT("my",("Fd: %d Seek: %lu Buffer: 0x%lx Count: %u MyFlags: %d",
- Filedes, (ulong) offset, Buffer, Count, MyFlags));
+ Filedes, (ulong) offset, (long) Buffer, Count, MyFlags));
for (;;)
{
@@ -49,8 +49,8 @@ uint my_pread(File Filedes, byte *Buffer, uint Count, my_off_t offset,
if (error)
{
my_errno=errno;
- DBUG_PRINT("warning",("Read only %ld bytes off %ld from %d, errno: %d",
- readbytes,Count,Filedes,my_errno));
+ DBUG_PRINT("warning",("Read only %u bytes off %u from %d, errno: %d",
+ readbytes, Count, Filedes, my_errno));
#ifdef THREAD
if ((readbytes == 0 || (int) readbytes == -1) && errno == EINTR)
{
@@ -87,7 +87,7 @@ uint my_pwrite(int Filedes, const byte *Buffer, uint Count, my_off_t offset,
ulong written;
DBUG_ENTER("my_pwrite");
DBUG_PRINT("my",("Fd: %d Seek: %lu Buffer: 0x%lx Count: %d MyFlags: %d",
- Filedes, (ulong) offset,Buffer, Count, MyFlags));
+ Filedes, (ulong) offset, (long) Buffer, Count, MyFlags));
errors=0; written=0L;
for (;;)
diff --git a/mysys/my_read.c b/mysys/my_read.c
index 8b88e483fef..a08a008de6f 100644
--- a/mysys/my_read.c
+++ b/mysys/my_read.c
@@ -39,7 +39,7 @@ uint my_read(File Filedes, byte *Buffer, uint Count, myf MyFlags)
uint readbytes, save_count;
DBUG_ENTER("my_read");
DBUG_PRINT("my",("Fd: %d Buffer: 0x%lx Count: %u MyFlags: %d",
- Filedes, Buffer, Count, MyFlags));
+ Filedes, (long) Buffer, Count, MyFlags));
save_count= Count;
for (;;)
@@ -48,7 +48,7 @@ uint my_read(File Filedes, byte *Buffer, uint Count, myf MyFlags)
if ((readbytes= (uint) read(Filedes, Buffer, Count)) != Count)
{
my_errno= errno ? errno : -1;
- DBUG_PRINT("warning",("Read only %ld bytes off %ld from %d, errno: %d",
+ DBUG_PRINT("warning",("Read only %u bytes off %u from %d, errno: %d",
readbytes, Count, Filedes, my_errno));
#ifdef THREAD
if ((readbytes == 0 || (int) readbytes == -1) && errno == EINTR)
diff --git a/mysys/my_realloc.c b/mysys/my_realloc.c
index c8edb172890..872518f2b0b 100644
--- a/mysys/my_realloc.c
+++ b/mysys/my_realloc.c
@@ -27,8 +27,8 @@ gptr my_realloc(gptr oldpoint, uint size, myf my_flags)
{
gptr point;
DBUG_ENTER("my_realloc");
- DBUG_PRINT("my",("ptr: 0x%lx size: %u my_flags: %d",oldpoint, size,
- my_flags));
+ DBUG_PRINT("my",("ptr: 0x%lx size: %u my_flags: %d",
+ (long) oldpoint, size, my_flags));
if (!oldpoint && (my_flags & MY_ALLOW_ZERO_PTR))
DBUG_RETURN(my_malloc(size,my_flags));
@@ -60,6 +60,6 @@ gptr my_realloc(gptr oldpoint, uint size, myf my_flags)
my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_WAITTANG), size);
}
#endif
- DBUG_PRINT("exit",("ptr: 0x%lx",point));
+ DBUG_PRINT("exit",("ptr: 0x%lx", (long) point));
DBUG_RETURN(point);
} /* my_realloc */
diff --git a/mysys/my_seek.c b/mysys/my_seek.c
index a9ae68cd5f0..5f8318cd729 100644
--- a/mysys/my_seek.c
+++ b/mysys/my_seek.c
@@ -55,7 +55,7 @@ my_off_t my_seek(File fd, my_off_t pos, int whence,
if (newpos == (os_off_t) -1)
{
my_errno=errno;
- DBUG_PRINT("error",("lseek: %lu, errno: %d",newpos,errno));
+ DBUG_PRINT("error",("lseek: %lu errno: %d", (ulong) newpos, errno));
DBUG_RETURN(MY_FILEPOS_ERROR);
}
if ((my_off_t) newpos != pos)
diff --git a/mysys/my_tempnam.c b/mysys/my_tempnam.c
index 9f765298fb6..4b4ab8de242 100644
--- a/mysys/my_tempnam.c
+++ b/mysys/my_tempnam.c
@@ -106,7 +106,7 @@ my_string my_tempnam(const char *dir, const char *pfx,
#ifdef OS2
/* changing environ variable doesn't work with VACPP */
char buffer[256], *end;
- buffer[sizeof[buffer)-1]= 0;
+ buffer[sizeof(buffer)-1]= 0;
end= strxnmov(buffer, sizeof(buffer)-1, (char*) "TMP=", dir, NullS);
/* remove ending backslash */
if (end[-1] == '\\')
diff --git a/mysys/my_write.c b/mysys/my_write.c
index ae8cb4ab02b..26b9a4f2444 100644
--- a/mysys/my_write.c
+++ b/mysys/my_write.c
@@ -27,7 +27,7 @@ uint my_write(int Filedes, const byte *Buffer, uint Count, myf MyFlags)
ulong written;
DBUG_ENTER("my_write");
DBUG_PRINT("my",("Fd: %d Buffer: 0x%lx Count: %d MyFlags: %d",
- Filedes, Buffer, Count, MyFlags));
+ Filedes, (long) Buffer, Count, MyFlags));
errors=0; written=0L;
for (;;)
diff --git a/mysys/raid.cc b/mysys/raid.cc
index 62587c438ca..4f1be0103e9 100644
--- a/mysys/raid.cc
+++ b/mysys/raid.cc
@@ -185,8 +185,8 @@ extern "C" {
uint my_raid_write(File fd,const byte *Buffer, uint Count, myf MyFlags)
{
DBUG_ENTER("my_raid_write");
- DBUG_PRINT("enter",("Fd: %d Buffer: %lx Count: %u MyFlags: %d",
- fd, Buffer, Count, MyFlags));
+ DBUG_PRINT("enter",("Fd: %d Buffer: 0x%lx Count: %u MyFlags: %d",
+ fd, (long) Buffer, Count, MyFlags));
if (is_raid(fd))
{
RaidFd *raid= (*dynamic_element(&RaidFd::_raid_map,fd,RaidFd**));
@@ -198,8 +198,8 @@ extern "C" {
uint my_raid_read(File fd, byte *Buffer, uint Count, myf MyFlags)
{
DBUG_ENTER("my_raid_read");
- DBUG_PRINT("enter",("Fd: %d Buffer: %lx Count: %u MyFlags: %d",
- fd, Buffer, Count, MyFlags));
+ DBUG_PRINT("enter",("Fd: %d Buffer: 0x%lx Count: %u MyFlags: %d",
+ fd, (long) Buffer, Count, MyFlags));
if (is_raid(fd))
{
RaidFd *raid= (*dynamic_element(&RaidFd::_raid_map,fd,RaidFd**));
@@ -212,8 +212,9 @@ extern "C" {
myf MyFlags)
{
DBUG_ENTER("my_raid_pread");
- DBUG_PRINT("enter",("Fd: %d Buffer: %lx Count: %u offset: %u MyFlags: %d",
- Filedes, Buffer, Count, offset, MyFlags));
+ DBUG_PRINT("enter",
+ ("Fd: %d Buffer: 0x%lx Count: %u offset: %lu MyFlags: %d",
+ Filedes, (long) Buffer, Count, (ulong) offset, MyFlags));
if (is_raid(Filedes))
{
assert(offset != MY_FILEPOS_ERROR);
@@ -231,8 +232,8 @@ extern "C" {
my_off_t offset, myf MyFlags)
{
DBUG_ENTER("my_raid_pwrite");
- DBUG_PRINT("enter",("Fd: %d Buffer: %lx Count: %u offset: %u MyFlags: %d",
- Filedes, Buffer, Count, offset, MyFlags));
+ DBUG_PRINT("enter",("Fd: %d Buffer: 0x%lx Count: %u offset: %lu MyFlags: %d",
+ Filedes, (long) Buffer, Count, (ulong) offset, MyFlags));
if (is_raid(Filedes))
{
assert(offset != MY_FILEPOS_ERROR);
@@ -250,8 +251,8 @@ extern "C" {
myf MyFlags)
{
DBUG_ENTER("my_raid_lock");
- DBUG_PRINT("enter",("Fd: %d start: %u length: %u MyFlags: %d",
- fd, start, length, MyFlags));
+ DBUG_PRINT("enter",("Fd: %d start: %lu length: %lu MyFlags: %d",
+ fd, (ulong) start, (ulong) length, MyFlags));
if (my_disable_locking)
DBUG_RETURN(0);
if (is_raid(fd))
@@ -284,8 +285,8 @@ extern "C" {
int my_raid_chsize(File fd, my_off_t newlength, int filler, myf MyFlags)
{
DBUG_ENTER("my_raid_chsize");
- DBUG_PRINT("enter",("Fd: %d newlength: %u MyFlags: %d",
- fd, newlength, MyFlags));
+ DBUG_PRINT("enter",("Fd: %d newlength: %lu MyFlags: %d",
+ fd, (ulong) newlength, MyFlags));
if (is_raid(fd))
{
RaidFd *raid= (*dynamic_element(&RaidFd::_raid_map,fd,RaidFd**));
@@ -413,7 +414,7 @@ RaidFd(uint raid_type, uint raid_chunks, ulong raid_chunksize)
_fd_vector(0)
{
DBUG_ENTER("RaidFd::RaidFd");
- DBUG_PRINT("enter",("RaidFd_type: %u Disks: %u Chunksize: %d",
+ DBUG_PRINT("enter",("RaidFd_type: %u Disks: %u Chunksize: %lu",
raid_type, raid_chunks, raid_chunksize));
/* TODO: Here we should add checks if the malloc fails */
@@ -622,7 +623,7 @@ Lock(int locktype, my_off_t start, my_off_t length, myf MyFlags)
{
DBUG_ENTER("RaidFd::Lock");
DBUG_PRINT("enter",("locktype: %d start: %lu length: %lu MyFlags: %d",
- locktype, start, length, MyFlags));
+ locktype, (ulong) start, (ulong) length, MyFlags));
my_off_t bufptr = start;
// Loop until all data is locked
while(length)
@@ -732,8 +733,8 @@ my_off_t RaidFd::
Tell(myf MyFlags)
{
DBUG_ENTER("RaidFd::Tell");
- DBUG_PRINT("enter",("MyFlags: %d _position %d",
- MyFlags,_position));
+ DBUG_PRINT("enter",("MyFlags: %d _position: %lu",
+ MyFlags, (ulong) _position));
DBUG_RETURN(_position);
}
@@ -741,8 +742,8 @@ int RaidFd::
Chsize(File fd, my_off_t newlength, int filler, myf MyFlags)
{
DBUG_ENTER("RaidFd::Chsize");
- DBUG_PRINT("enter",("Fd: %d, newlength: %d, MyFlags: %d",
- fd, newlength,MyFlags));
+ DBUG_PRINT("enter",("Fd: %d newlength: %lu MyFlags: %d",
+ fd, (ulong) newlength, MyFlags));
_position = newlength;
Calculate();
uint _rounds = _total_block / _raid_chunks; // INT() assumed
diff --git a/mysys/safemalloc.c b/mysys/safemalloc.c
index 6cdf98c5f5f..5f93b861b31 100644
--- a/mysys/safemalloc.c
+++ b/mysys/safemalloc.c
@@ -194,7 +194,7 @@ gptr _mymalloc(uint size, const char *filename, uint lineno, myf MyFlags)
if ((MyFlags & MY_ZEROFILL) || !sf_malloc_quick)
bfill(data, size, (char) (MyFlags & MY_ZEROFILL ? 0 : ALLOC_VAL));
/* Return a pointer to the real data */
- DBUG_PRINT("exit",("ptr: 0x%lx", data));
+ DBUG_PRINT("exit",("ptr: 0x%lx", (long) data));
if (sf_min_adress > data)
sf_min_adress= data;
if (sf_max_adress < data)
@@ -259,7 +259,7 @@ void _myfree(gptr ptr, const char *filename, uint lineno, myf myflags)
{
struct st_irem *irem;
DBUG_ENTER("_myfree");
- DBUG_PRINT("enter",("ptr: 0x%lx", ptr));
+ DBUG_PRINT("enter",("ptr: 0x%lx", (long) ptr));
if (!sf_malloc_quick)
(void) _sanity (filename, lineno);
@@ -410,7 +410,7 @@ void TERMINATE(FILE *file)
}
DBUG_PRINT("safe",
("%6u bytes at 0x%09lx, allocated at line %4d in '%s'",
- irem->datasize, data, irem->linenum, irem->filename));
+ irem->datasize, (long) data, irem->linenum, irem->filename));
irem= irem->next;
}
}
@@ -447,7 +447,7 @@ static int _checkchunk(register struct st_irem *irem, const char *filename,
fprintf(stderr, " discovered at %s:%d\n", filename, lineno);
(void) fflush(stderr);
DBUG_PRINT("safe",("Underrun at 0x%lx, allocated at %s:%d",
- data, irem->filename, irem->linenum));
+ (long) data, irem->filename, irem->linenum));
flag=1;
}
@@ -463,7 +463,7 @@ static int _checkchunk(register struct st_irem *irem, const char *filename,
fprintf(stderr, " discovered at '%s:%d'\n", filename, lineno);
(void) fflush(stderr);
DBUG_PRINT("safe",("Overrun at 0x%lx, allocated at %s:%d",
- data,
+ (long) data,
irem->filename,
irem->linenum));
flag=1;
diff --git a/mysys/thr_lock.c b/mysys/thr_lock.c
index d6443539216..fb1c2ca6409 100644
--- a/mysys/thr_lock.c
+++ b/mysys/thr_lock.c
@@ -436,7 +436,8 @@ int thr_lock(THR_LOCK_DATA *data,enum thr_lock_type lock_type)
data->thread_id=my_thread_id(); /* Must be reset ! */
VOID(pthread_mutex_lock(&lock->mutex));
DBUG_PRINT("lock",("data: 0x%lx thread: %ld lock: 0x%lx type: %d",
- data,data->thread_id,lock,(int) lock_type));
+ (long) data, data->thread_id, (long) lock,
+ (int) lock_type));
check_locks(lock,(uint) lock_type <= (uint) TL_READ_NO_INSERT ?
"enter read_lock" : "enter write_lock",0);
if ((int) lock_type <= (int) TL_READ_NO_INSERT)
@@ -598,8 +599,8 @@ int thr_lock(THR_LOCK_DATA *data,enum thr_lock_type lock_type)
goto end;
}
}
- DBUG_PRINT("lock",("write locked by thread: %ld, type: %ld",
- lock->read.data->thread_id,data->type));
+ DBUG_PRINT("lock",("write locked by thread: %ld type: %d",
+ lock->read.data->thread_id, (int) data->type));
}
DBUG_RETURN(wait_for_lock(&lock->write_wait,data,0));
}
@@ -665,7 +666,7 @@ void thr_unlock(THR_LOCK_DATA *data)
enum thr_lock_type lock_type=data->type;
DBUG_ENTER("thr_unlock");
DBUG_PRINT("lock",("data: 0x%lx thread: %ld lock: 0x%lx",
- data,data->thread_id,lock));
+ (long) data, data->thread_id, (long) lock));
pthread_mutex_lock(&lock->mutex);
check_locks(lock,"start of release lock",0);
@@ -835,7 +836,7 @@ int thr_multi_lock(THR_LOCK_DATA **data,uint count)
{
THR_LOCK_DATA **pos,**end;
DBUG_ENTER("thr_multi_lock");
- DBUG_PRINT("lock",("data: 0x%lx count: %d",data,count));
+ DBUG_PRINT("lock",("data: 0x%lx count: %d", (long) data, count));
if (count > 1)
sort_locks(data,count);
/* lock everything */
@@ -907,7 +908,7 @@ void thr_multi_unlock(THR_LOCK_DATA **data,uint count)
{
THR_LOCK_DATA **pos,**end;
DBUG_ENTER("thr_multi_unlock");
- DBUG_PRINT("lock",("data: 0x%lx count: %d",data,count));
+ DBUG_PRINT("lock",("data: 0x%lx count: %d", (long) data, count));
for (pos=data,end=data+count; pos < end ; pos++)
{
@@ -921,7 +922,7 @@ void thr_multi_unlock(THR_LOCK_DATA **data,uint count)
else
{
DBUG_PRINT("lock",("Free lock: data: 0x%lx thread: %ld lock: 0x%lx",
- *pos,(*pos)->thread_id,(*pos)->lock));
+ (long) *pos, (*pos)->thread_id, (long) (*pos)->lock));
}
}
DBUG_VOID_RETURN;
diff --git a/mysys/tree.c b/mysys/tree.c
index bec1ec680f1..4eae086ab96 100644
--- a/mysys/tree.c
+++ b/mysys/tree.c
@@ -89,7 +89,7 @@ void init_tree(TREE *tree, uint default_alloc_size, uint memory_limit,
tree_element_free free_element, void *custom_arg)
{
DBUG_ENTER("init_tree");
- DBUG_PRINT("enter",("tree: 0x%lx size: %d",tree,size));
+ DBUG_PRINT("enter",("tree: 0x%lx size: %d", (long) tree, size));
if (default_alloc_size < DEFAULT_ALLOC_SIZE)
default_alloc_size= DEFAULT_ALLOC_SIZE;
@@ -137,7 +137,7 @@ void init_tree(TREE *tree, uint default_alloc_size, uint memory_limit,
static void free_tree(TREE *tree, myf free_flags)
{
DBUG_ENTER("free_tree");
- DBUG_PRINT("enter",("tree: 0x%lx",tree));
+ DBUG_PRINT("enter",("tree: 0x%lx", (long) tree));
if (tree->root) /* If initialized */
{
diff --git a/mysys/typelib.c b/mysys/typelib.c
index 90a093b0b32..d329b687668 100644
--- a/mysys/typelib.c
+++ b/mysys/typelib.c
@@ -49,7 +49,7 @@ int find_type(my_string x, TYPELIB *typelib, uint full_name)
reg1 my_string i;
reg2 const char *j;
DBUG_ENTER("find_type");
- DBUG_PRINT("enter",("x: '%s' lib: 0x%lx",x,typelib));
+ DBUG_PRINT("enter",("x: '%s' lib: 0x%lx", x, (long) typelib));
if (!typelib->count)
{
diff --git a/ndb/src/mgmclient/CommandInterpreter.cpp b/ndb/src/mgmclient/CommandInterpreter.cpp
index ea5dc218898..3b47abd7cd3 100644
--- a/ndb/src/mgmclient/CommandInterpreter.cpp
+++ b/ndb/src/mgmclient/CommandInterpreter.cpp
@@ -1263,8 +1263,8 @@ CommandInterpreter::executeConnect(char* parameters)
int retval;
disconnect();
if (!emptyString(parameters)) {
- if (retval = ndb_mgm_set_connectstring(m_mgmsrv,
- BaseString(parameters).trim().c_str()))
+ if ((retval = ndb_mgm_set_connectstring(m_mgmsrv,
+ BaseString(parameters).trim().c_str())))
{
printError();
return retval;
diff --git a/regex/regexec.c b/regex/regexec.c
index b7ad83ba883..13c253ca4f6 100644
--- a/regex/regexec.c
+++ b/regex/regexec.c
@@ -15,7 +15,8 @@
#include "utils.h"
#include "regex2.h"
-static int nope = 0; /* for use in asserts; shuts lint up */
+/* for use in asserts */
+#define nope 0
/* macros for manipulating states, small version */
#define states long
diff --git a/sql-common/client.c b/sql-common/client.c
index 431c1bdf418..27ed5cf4dbd 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -601,7 +601,7 @@ net_safe_read(MYSQL *mysql)
if (len == packet_error || len == 0)
{
- DBUG_PRINT("error",("Wrong connection or packet. fd: %s len: %d",
+ DBUG_PRINT("error",("Wrong connection or packet. fd: %s len: %lu",
vio_description(net->vio),len));
#ifdef MYSQL_SERVER
if (vio_was_interrupted(net->vio))
@@ -858,7 +858,7 @@ void STDCALL
mysql_free_result(MYSQL_RES *result)
{
DBUG_ENTER("mysql_free_result");
- DBUG_PRINT("enter",("mysql_res: %lx",result));
+ DBUG_PRINT("enter",("mysql_res: 0x%lx", (ulong) result));
if (result)
{
MYSQL *mysql= result->handle;
@@ -1174,7 +1174,7 @@ unpack_fields(MYSQL_DATA *data,MEM_ROOT *alloc,uint fields,
{
uchar *pos;
/* fields count may be wrong */
- DBUG_ASSERT ((field - result) < fields);
+ DBUG_ASSERT ((uint) (field - result) < fields);
cli_fetch_lengths(&lengths[0], row->data, default_value ? 8 : 7);
field->catalog = strdup_root(alloc,(char*) row->data[0]);
field->db = strdup_root(alloc,(char*) row->data[1]);
@@ -1350,7 +1350,7 @@ MYSQL_DATA *cli_read_rows(MYSQL *mysql,MYSQL_FIELD *mysql_fields,
DBUG_PRINT("info",("status: %u warning_count: %u",
mysql->server_status, mysql->warning_count));
}
- DBUG_PRINT("exit",("Got %d rows",result->rows));
+ DBUG_PRINT("exit",("Got %lu rows", (ulong) result->rows));
DBUG_RETURN(result);
}
@@ -2178,7 +2178,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
goto error;
#endif
- DBUG_PRINT("exit",("Mysql handler: %lx",mysql));
+ DBUG_PRINT("exit",("Mysql handler: 0x%lx", (ulong) mysql));
reset_sigpipe(mysql);
DBUG_RETURN(mysql);
@@ -2533,7 +2533,7 @@ int STDCALL
mysql_real_query(MYSQL *mysql, const char *query, ulong length)
{
DBUG_ENTER("mysql_real_query");
- DBUG_PRINT("enter",("handle: %lx",mysql));
+ DBUG_PRINT("enter",("handle: 0x%lx", (ulong) mysql));
DBUG_PRINT("query",("Query = '%-.4096s'",query));
if (mysql_send_query(mysql,query,length))
diff --git a/sql-common/my_time.c b/sql-common/my_time.c
index 77226da3dc8..532a8f843e5 100644
--- a/sql-common/my_time.c
+++ b/sql-common/my_time.c
@@ -902,7 +902,7 @@ my_system_gmt_sec(const MYSQL_TIME *t_src, long *my_timezone,
*/
if ((tmp < TIMESTAMP_MIN_VALUE) || (tmp > TIMESTAMP_MAX_VALUE))
tmp= 0;
-end:
+
return (my_time_t) tmp;
} /* my_system_gmt_sec */
diff --git a/sql/examples/ha_archive.cc b/sql/examples/ha_archive.cc
index 16ba7605415..02d27b398f1 100644
--- a/sql/examples/ha_archive.cc
+++ b/sql/examples/ha_archive.cc
@@ -573,7 +573,8 @@ int ha_archive::write_row(byte * buf)
table->timestamp_field->set_time();
pthread_mutex_lock(&share->mutex);
written= gzwrite(share->archive_write, buf, table->reclength);
- DBUG_PRINT("ha_archive::get_row", ("Wrote %d bytes expected %d", written, table->reclength));
+ DBUG_PRINT("ha_archive::get_row", ("Wrote %d bytes expected %d", (int) written,
+ table->reclength));
share->dirty= TRUE;
if (written != (z_off_t)table->reclength)
goto error;
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc
index 3d1724efb91..d7219bb0b1c 100644
--- a/sql/ha_innodb.cc
+++ b/sql/ha_innodb.cc
@@ -3594,7 +3594,7 @@ ha_innobase::rnd_pos(
}
if (error) {
- DBUG_PRINT("error",("Got error: %ld",error));
+ DBUG_PRINT("error",("Got error: %d", error));
DBUG_RETURN(error);
}
@@ -3604,7 +3604,7 @@ ha_innobase::rnd_pos(
error = index_read(buf, pos, ref_length, HA_READ_KEY_EXACT);
if (error)
{
- DBUG_PRINT("error",("Got error: %ld",error));
+ DBUG_PRINT("error",("Got error: %d", error));
}
change_active_index(keynr);
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
index d16e00f4e52..d61c8242677 100644
--- a/sql/ha_ndbcluster.cc
+++ b/sql/ha_ndbcluster.cc
@@ -692,8 +692,8 @@ int ha_ndbcluster::get_ndb_blobs_value(NdbBlob *last_ndb_blob)
{
char *buf= m_blobs_buffer + offset;
uint32 len= 0xffffffff; // Max uint32
- DBUG_PRINT("value", ("read blob ptr=%x len=%u",
- (UintPtr)buf, (uint)blob_len));
+ DBUG_PRINT("value", ("read blob ptr: 0x%lx len: %u",
+ (ulong)buf, (uint)blob_len));
if (ndb_blob->readData(buf, len) != 0)
DBUG_RETURN(-1);
DBUG_ASSERT(len == blob_len);
@@ -1484,7 +1484,7 @@ inline int ha_ndbcluster::next_result(byte *buf)
all pending update or delete operations should
be sent to NDB
*/
- DBUG_PRINT("info", ("ops_pending: %d", m_ops_pending));
+ DBUG_PRINT("info", ("ops_pending: %lu", (ulong) m_ops_pending));
if (m_ops_pending)
{
// if (current_thd->transaction.on)
@@ -2026,7 +2026,7 @@ int ha_ndbcluster::write_row(byte *record)
(ulong) next_val));
if (ndb->setAutoIncrementValue((const NDBTAB *) m_table, next_val, TRUE))
DBUG_PRINT("info",
- ("Setting next auto increment value to %u", next_val));
+ ("Setting next auto increment value to %u", (uint) next_val));
}
m_skip_auto_increment= TRUE;
@@ -2417,7 +2417,7 @@ void ha_ndbcluster::print_results()
break;
}
case NdbDictionary::Column::Int: {
- fprintf(DBUG_FILE, "Int\t%lld", field->val_int());
+ fprintf(DBUG_FILE, "Int\t%ld", (long) field->val_int());
break;
}
case NdbDictionary::Column::Unsigned: {
@@ -2787,7 +2787,7 @@ int ha_ndbcluster::close_scan()
Take over any pending transactions to the
deleteing/updating transaction before closing the scan
*/
- DBUG_PRINT("info", ("ops_pending: %d", m_ops_pending));
+ DBUG_PRINT("info", ("ops_pending: %lu", (ulong) m_ops_pending));
if (execute_no_commit(this,trans) != 0) {
no_uncommitted_rows_execute_failure();
DBUG_RETURN(ndb_err(trans));
@@ -3823,7 +3823,7 @@ static int create_ndb_column(NDBCOL &col,
col.setAutoIncrement(TRUE);
ulonglong value= info->auto_increment_value ?
info->auto_increment_value : (ulonglong) 1;
- DBUG_PRINT("info", ("Autoincrement key, initial: %llu", value));
+ DBUG_PRINT("info", ("Autoincrement key, initial: %lu", (ulong) value));
col.setAutoIncrementInitialValue(value);
}
else
@@ -3926,7 +3926,8 @@ int ha_ndbcluster::create(const char *name,
if (packfrm(data, length, &pack_data, &pack_length))
DBUG_RETURN(2);
- DBUG_PRINT("info", ("setFrm data=%x, len=%d", pack_data, pack_length));
+ DBUG_PRINT("info", ("setFrm data: 0x%lx len: %u", (ulong) pack_data,
+ pack_length));
tab.setFrm(pack_data, pack_length);
my_free((char*)data, MYF(0));
my_free((char*)pack_data, MYF(0));
@@ -3934,7 +3935,7 @@ int ha_ndbcluster::create(const char *name,
for (i= 0; i < form->fields; i++)
{
Field *field= form->field[i];
- DBUG_PRINT("info", ("name: %s, type: %u, pack_length: %d",
+ DBUG_PRINT("info", ("name: %s type: %u pack_length: %d",
field->field_name, field->real_type(),
field->pack_length()));
if ((my_errno= create_ndb_column(col, field, info)))
@@ -5221,14 +5222,14 @@ static int packfrm(const void *data, uint len,
uint blob_len;
frm_blob_struct* blob;
DBUG_ENTER("packfrm");
- DBUG_PRINT("enter", ("data: %x, len: %d", data, len));
+ DBUG_PRINT("enter", ("data: 0x%lx len: %u", (ulong) data, len));
error= 1;
org_len= len;
if (my_compress((byte*)data, &org_len, &comp_len))
goto err;
- DBUG_PRINT("info", ("org_len: %d, comp_len: %d", org_len, comp_len));
+ DBUG_PRINT("info", ("org_len: %lu comp_len: %lu", org_len, comp_len));
DBUG_DUMP("compressed", (char*)data, org_len);
error= 2;
@@ -5248,7 +5249,8 @@ static int packfrm(const void *data, uint len,
*pack_len= blob_len;
error= 0;
- DBUG_PRINT("exit", ("pack_data: %x, pack_len: %d", *pack_data, *pack_len));
+ DBUG_PRINT("exit", ("pack_data: 0x%lx pack_len: %u", (ulong) *pack_data,
+ *pack_len));
err:
DBUG_RETURN(error);
@@ -5262,13 +5264,13 @@ static int unpackfrm(const void **unpack_data, uint *unpack_len,
byte *data;
ulong complen, orglen, ver;
DBUG_ENTER("unpackfrm");
- DBUG_PRINT("enter", ("pack_data: %x", pack_data));
+ DBUG_PRINT("enter", ("pack_data: 0x%lx", (ulong) pack_data));
complen= uint4korr((char*)&blob->head.complen);
orglen= uint4korr((char*)&blob->head.orglen);
ver= uint4korr((char*)&blob->head.ver);
- DBUG_PRINT("blob",("ver: %d complen: %d orglen: %d",
+ DBUG_PRINT("blob",("ver: %lu complen: %lu orglen: %lu",
ver,complen,orglen));
DBUG_DUMP("blob->data", (char*) blob->data, complen);
@@ -5287,7 +5289,8 @@ static int unpackfrm(const void **unpack_data, uint *unpack_len,
*unpack_data= data;
*unpack_len= complen;
- DBUG_PRINT("exit", ("frmdata: %x, len: %d", *unpack_data, *unpack_len));
+ DBUG_PRINT("exit", ("frmdata: 0x%lx len: %u", (ulong) *unpack_data,
+ *unpack_len));
DBUG_RETURN(0);
}
@@ -5367,7 +5370,8 @@ ndb_get_table_statistics(ha_ndbcluster* file, bool report_error, Ndb* ndb,
* row_count= sum_rows;
if(commit_count)
* commit_count= sum_commits;
- DBUG_PRINT("exit", ("records: %u commits: %u", sum_rows, sum_commits));
+ DBUG_PRINT("exit", ("records: %u commits: %u", (uint) sum_rows,
+ (uint) sum_commits));
DBUG_RETURN(0);
retry:
diff --git a/sql/item.cc b/sql/item.cc
index bf96fdf3f43..a43f9c092ec 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -649,6 +649,8 @@ bool agg_item_charsets(DTCollation &coll, const char *fname,
doesn't display each argument's characteristics.
- if nargs is 1, then this error cannot happen.
*/
+ LINT_INIT(safe_args[0]);
+ LINT_INIT(safe_args[1]);
if (nargs >=2 && nargs <= 3)
{
safe_args[0]= args[0];
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index ffb60754381..bd763ccec2f 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -1738,7 +1738,7 @@ byte *in_row::get_value(Item *item)
void in_row::set(uint pos, Item *item)
{
DBUG_ENTER("in_row::set");
- DBUG_PRINT("enter", ("pos %u item 0x%lx", pos, (ulong) item));
+ DBUG_PRINT("enter", ("pos: %u item: 0x%lx", pos, (ulong) item));
((cmp_item_row*) base)[pos].store_value_by_template(&tmp, item);
DBUG_VOID_RETURN;
}
@@ -1820,7 +1820,7 @@ cmp_item* cmp_item_row::make_same()
cmp_item_row::~cmp_item_row()
{
DBUG_ENTER("~cmp_item_row");
- DBUG_PRINT("enter",("this: %lx", this));
+ DBUG_PRINT("enter",("this: 0x%lx", (long) this));
if (comparators)
{
for (uint i= 0; i < n; i++)
@@ -2413,7 +2413,7 @@ longlong Item_is_not_null_test::val_int()
if (!used_tables_cache && !with_subselect)
{
owner->was_null|= (!cached_value);
- DBUG_PRINT("info", ("cached :%d", cached_value));
+ DBUG_PRINT("info", ("cached :%ld", (long) cached_value));
DBUG_RETURN(cached_value);
}
if (args[0]->is_null())
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc
index cdbcde8b56b..f17a2d2c8d3 100644
--- a/sql/item_subselect.cc
+++ b/sql/item_subselect.cc
@@ -54,7 +54,7 @@ void Item_subselect::init(st_select_lex *select_lex,
{
DBUG_ENTER("Item_subselect::init");
- DBUG_PRINT("subs", ("select_lex 0x%xl", (ulong) select_lex));
+ DBUG_PRINT("subs", ("select_lex: 0x%lx", (ulong) select_lex));
unit= select_lex->master_unit();
if (unit->item)
diff --git a/sql/log.cc b/sql/log.cc
index b91ec2b3dee..0fc06653e00 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -2255,8 +2255,8 @@ void MYSQL_LOG::report_pos_in_innodb()
if (is_open() && have_innodb == SHOW_OPTION_YES)
{
DBUG_PRINT("info", ("Reporting binlog info into InnoDB - "
- "name: '%s' position: %d",
- log_file_name, my_b_tell(&log_file)));
+ "name: '%s' position: %lu",
+ log_file_name, (ulong) my_b_tell(&log_file)));
innobase_store_binlog_offset_and_flush_log(log_file_name,
my_b_tell(&log_file));
}
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 412ebbce0ac..d02bb2a5483 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -2043,8 +2043,8 @@ Rotate_log_event::Rotate_log_event(THD* thd_arg,
#ifndef DBUG_OFF
char buff[22];
DBUG_ENTER("Rotate_log_event::Rotate_log_event(THD*,...)");
- DBUG_PRINT("enter",("new_log_ident %s pos %s flags %lu", new_log_ident_arg,
- llstr(pos_arg, buff), flags));
+ DBUG_PRINT("enter",("new_log_ident: %s pos: %s flags: %u",
+ new_log_ident_arg, llstr(pos_arg, buff), flags));
#endif
if (flags & DUP_NAME)
new_log_ident= my_strdup_with_length((byte*) new_log_ident_arg,
@@ -2673,7 +2673,7 @@ Slave_log_event::Slave_log_event(THD* thd_arg,
memcpy(master_log, rli->group_master_log_name, master_log_len + 1);
master_port = mi->port;
master_pos = rli->group_master_log_pos;
- DBUG_PRINT("info", ("master_log: %s pos: %d", master_log,
+ DBUG_PRINT("info", ("master_log: %s pos: %lu", master_log,
(ulong) master_pos));
}
else
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 20f20a0a86b..91e124743ce 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -1443,7 +1443,7 @@ static void server_init(void)
if (strlen(mysqld_unix_port) > (sizeof(UNIXaddr.sun_path) - 1))
{
- sql_print_error("The socket file path is too long (> %lu): %s",
+ sql_print_error("The socket file path is too long (> %u): %s",
sizeof(UNIXaddr.sun_path) - 1, mysqld_unix_port);
unireg_abort(1);
}
@@ -3189,7 +3189,7 @@ int main(int argc, char **argv)
{
if (global_system_variables.log_warnings)
sql_print_warning("Asked for %ld thread stack, but got %ld",
- thread_stack, stack_size);
+ thread_stack, (long) stack_size);
thread_stack= stack_size;
}
}
@@ -3669,7 +3669,7 @@ static void create_new_thread(THD *thd)
threads.append(thd);
if (thread_count-delayed_insert_threads > max_used_connections)
max_used_connections=thread_count-delayed_insert_threads;
- DBUG_PRINT("info",(("creating thread %d"), thd->thread_id));
+ DBUG_PRINT("info",(("creating thread %lu"), thd->thread_id));
thd->connect_time = time(NULL);
if ((error=pthread_create(&thd->real_id,&connection_attrib,
handle_one_connection,
@@ -4767,7 +4767,8 @@ master-ssl",
(gptr*) &locked_in_memory, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"merge", OPT_MERGE, "Enable Merge storage engine. Disable with \
--skip-merge.",
- (gptr*) &opt_merge, (gptr*) &opt_merge, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0},
+ (gptr*) &opt_merge, (gptr*) &opt_merge, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0,
+ 0, 0},
{"myisam-recover", OPT_MYISAM_RECOVER,
"Syntax: myisam-recover[=option[,option...]], where option can be DEFAULT, BACKUP, FORCE or QUICK.",
(gptr*) &myisam_recover_options_str, (gptr*) &myisam_recover_options_str, 0,
diff --git a/sql/net_serv.cc b/sql/net_serv.cc
index a5a05d381cd..ead10fe7674 100644
--- a/sql/net_serv.cc
+++ b/sql/net_serv.cc
@@ -697,7 +697,7 @@ my_real_read(NET *net, ulong *complen)
{
my_bool interrupted = vio_should_retry(net->vio);
- DBUG_PRINT("info",("vio_read returned %d, errno: %d",
+ DBUG_PRINT("info",("vio_read returned %ld errno: %d",
length, vio_errno(net->vio)));
#if (!defined(__WIN__) && !defined(__EMX__) && !defined(OS2)) || defined(MYSQL_SERVER)
/*
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index 06e42ff363f..4ead85620cf 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -806,7 +806,7 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
double scan_time;
DBUG_ENTER("test_quick_select");
DBUG_PRINT("enter",("keys_to_use: %lu prev_tables: %lu const_tables: %lu",
- keys_to_use.to_ulonglong(), (ulong) prev_tables,
+ (ulong) keys_to_use.to_ulonglong(), (ulong) prev_tables,
(ulong) const_tables));
delete quick;
diff --git a/sql/slave.cc b/sql/slave.cc
index 75b18f6f307..c18e457471f 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -2822,7 +2822,7 @@ server_errno=%d)",
return packet_error;
}
- DBUG_PRINT("info",( "len=%u, net->read_pos[4] = %d\n",
+ DBUG_PRINT("info",( "len: %lu net->read_pos[4]: %d\n",
len, mysql->net.read_pos[4]));
return len - 1;
}
@@ -3743,7 +3743,7 @@ static int process_io_rotate(MASTER_INFO *mi, Rotate_log_event *rev)
/* Safe copy as 'rev' has been "sanitized" in Rotate_log_event's ctor */
memcpy(mi->master_log_name, rev->new_log_ident, rev->ident_len+1);
mi->master_log_pos= rev->pos;
- DBUG_PRINT("info", ("master_log_pos: '%s' %d",
+ DBUG_PRINT("info", ("master_log_pos: '%s' %lu",
mi->master_log_name, (ulong) mi->master_log_pos));
#ifndef DBUG_OFF
/*
@@ -3849,7 +3849,7 @@ static int queue_old_event(MASTER_INFO *mi, const char *buf,
position in the master's log, we must use the original value.
*/
mi->master_log_pos += --event_len;
- DBUG_PRINT("info", ("master_log_pos: %d", (ulong) mi->master_log_pos));
+ DBUG_PRINT("info", ("master_log_pos: %lu", (ulong) mi->master_log_pos));
pthread_mutex_unlock(&mi->data_lock);
my_free((char*)tmp_buf, MYF(0));
DBUG_RETURN(error);
@@ -3870,7 +3870,7 @@ static int queue_old_event(MASTER_INFO *mi, const char *buf,
}
delete ev;
mi->master_log_pos+= inc_pos;
- DBUG_PRINT("info", ("master_log_pos: %d", (ulong) mi->master_log_pos));
+ DBUG_PRINT("info", ("master_log_pos: %lu", (ulong) mi->master_log_pos));
pthread_mutex_unlock(&mi->data_lock);
DBUG_RETURN(0);
}
@@ -3963,7 +3963,7 @@ int queue_event(MASTER_INFO* mi,const char* buf, ulong event_len)
DBUG_ASSERT(rli->ign_master_log_name_end[0]);
rli->ign_master_log_pos_end= mi->master_log_pos;
rli->relay_log.signal_update(); // the slave SQL thread needs to re-check
- DBUG_PRINT("info", ("master_log_pos: %d, event originating from the same server, ignored", (ulong) mi->master_log_pos));
+ DBUG_PRINT("info", ("master_log_pos: %lu event originating from the same server, ignored", (ulong) mi->master_log_pos));
}
else
{
@@ -3971,7 +3971,7 @@ int queue_event(MASTER_INFO* mi,const char* buf, ulong event_len)
if (likely(!(error= rli->relay_log.appendv(buf,event_len,0))))
{
mi->master_log_pos+= inc_pos;
- DBUG_PRINT("info", ("master_log_pos: %d", (ulong) mi->master_log_pos));
+ DBUG_PRINT("info", ("master_log_pos: %lu", (ulong) mi->master_log_pos));
rli->relay_log.harvest_bytes_written(&rli->log_space_total);
}
rli->ign_master_log_name_end[0]= 0; // last event is not ignored
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc
index fc03e03dee7..9f7807aabc7 100644
--- a/sql/sql_cache.cc
+++ b/sql/sql_cache.cc
@@ -383,7 +383,7 @@ inline Query_cache_block * Query_cache_block_table::block()
void Query_cache_block::init(ulong block_length)
{
DBUG_ENTER("Query_cache_block::init");
- DBUG_PRINT("qcache", ("init block 0x%lx length: %lu", (ulong) this,
+ DBUG_PRINT("qcache", ("init block: 0x%lx length: %lu", (ulong) this,
block_length));
length = block_length;
used = 0;
@@ -528,7 +528,8 @@ void Query_cache_query::init_n_lock()
my_rwlock_init(&lock, NULL);
lock_writing();
DBUG_PRINT("qcache", ("inited & locked query for block 0x%lx",
- ((byte*) this)-ALIGN_SIZE(sizeof(Query_cache_block))));
+ (long) ((byte*) this) -
+ ALIGN_SIZE(sizeof(Query_cache_block))));
DBUG_VOID_RETURN;
}
@@ -537,7 +538,8 @@ void Query_cache_query::unlock_n_destroy()
{
DBUG_ENTER("Query_cache_query::unlock_n_destroy");
DBUG_PRINT("qcache", ("destroyed & unlocked query for block 0x%lx",
- ((byte*)this)-ALIGN_SIZE(sizeof(Query_cache_block))));
+ (long) ((byte*) this) -
+ ALIGN_SIZE(sizeof(Query_cache_block))));
/*
The following call is not needed on system where one can destroy an
active semaphore
@@ -1140,7 +1142,7 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length)
#ifndef EMBEDDED_LIBRARY
do
{
- DBUG_PRINT("qcache", ("Results (len %lu, used %lu, headers %lu)",
+ DBUG_PRINT("qcache", ("Results (len: %lu used: %lu headers: %u)",
result_block->length, result_block->used,
result_block->headers_len()+
ALIGN_SIZE(sizeof(Query_cache_result))));
@@ -1832,8 +1834,8 @@ Query_cache::append_result_data(Query_cache_block **current_block,
Query_cache_block *query_block)
{
DBUG_ENTER("Query_cache::append_result_data");
- DBUG_PRINT("qcache", ("append %lu bytes to 0x%lx query",
- data_len, query_block));
+ DBUG_PRINT("qcache", ("append: %lu bytes to: 0x%lx query",
+ data_len, (ulong) query_block));
if (query_block->query()->add(data_len) > query_cache_limit)
{
@@ -3336,10 +3338,10 @@ void Query_cache::queries_dump()
Query_cache_query_flags flags;
memcpy(&flags, str+len, QUERY_CACHE_FLAGS_SIZE);
str[len]= 0; // make zero ending DB name
- DBUG_PRINT("qcache", ("F:%u C:%u L:%lu T:'%s' (%u) '%s' '%s'",
+ DBUG_PRINT("qcache", ("F: %u C: %u L: %lu T: '%s' (%u) '%s' '%s'",
flags.client_long_flag,
flags.character_set_client_num,
- (ulong)flags.limit, flags.time_zone->get_name(),
+ (ulong)flags.limit, flags.time_zone->get_name()->ptr(),
len, str, strend(str)+1));
DBUG_PRINT("qcache", ("-b- 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx", (ulong) block,
(ulong) block->next, (ulong) block->prev,
@@ -3569,7 +3571,7 @@ my_bool Query_cache::check_integrity(bool not_locked)
default:
DBUG_PRINT("error",
("block 0x%lx have incorrect type %u",
- block, block->type));
+ (ulong) block, block->type));
result = 1;
}
@@ -3668,7 +3670,7 @@ my_bool Query_cache::check_integrity(bool not_locked)
if (count != bins[i].number)
{
DBUG_PRINT("error", ("bin[%d].number is %d, but bin have %d blocks",
- bins[i].number, count));
+ i, bins[i].number, count));
result = 1;
}
}
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index c8d90848f6e..fc20d7b38e1 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -156,9 +156,8 @@ bool foreign_key_prefix(Key *a, Key *b)
THD::THD()
:user_time(0), global_read_lock(0), is_fatal_error(0),
- last_insert_id_used(0),
- insert_id_used(0), rand_used(0), time_zone_used(0),
- in_lock_tables(0), bootstrap(0)
+ rand_used(0), last_insert_id_used(0), insert_id_used(0),
+ time_zone_used(0), in_lock_tables(0), bootstrap(0)
{
current_arena= this;
host= user= priv_user= db= ip=0;
@@ -616,7 +615,8 @@ void THD::add_changed_table(const char *key, long key_length)
{
list_include(prev_changed, curr, changed_table_dup(key, key_length));
DBUG_PRINT("info",
- ("key_length %u %u", key_length, (*prev_changed)->key_length));
+ ("key_length: %ld %u", key_length,
+ (*prev_changed)->key_length));
DBUG_VOID_RETURN;
}
else if (cmp == 0)
@@ -626,7 +626,7 @@ void THD::add_changed_table(const char *key, long key_length)
{
list_include(prev_changed, curr, changed_table_dup(key, key_length));
DBUG_PRINT("info",
- ("key_length %u %u", key_length,
+ ("key_length: %ld %u", key_length,
(*prev_changed)->key_length));
DBUG_VOID_RETURN;
}
@@ -638,7 +638,7 @@ void THD::add_changed_table(const char *key, long key_length)
}
}
*prev_changed = changed_table_dup(key, key_length);
- DBUG_PRINT("info", ("key_length %u %u", key_length,
+ DBUG_PRINT("info", ("key_length: %ld %u", key_length,
(*prev_changed)->key_length));
DBUG_VOID_RETURN;
}
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index b84b2f7eef4..3aa37a9935d 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -272,7 +272,7 @@ cleanup:
else
{
send_ok(thd,deleted);
- DBUG_PRINT("info",("%d records deleted",deleted));
+ DBUG_PRINT("info",("%lu records deleted", (ulong) deleted));
}
DBUG_RETURN(0);
}
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 66b68cfc2f1..8f735641e55 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -306,9 +306,9 @@ int check_user(THD *thd, enum enum_server_command command,
if (!(thd->master_access & NO_ACCESS)) // authentification is OK
{
DBUG_PRINT("info",
- ("Capabilities: %d packet_length: %ld Host: '%s' "
+ ("Capabilities: %lu packet_length: %ld Host: '%s' "
"Login user: '%s' Priv_user: '%s' Using password: %s "
- "Access: %u db: '%s'",
+ "Access: %lu db: '%s'",
thd->client_capabilities, thd->max_client_packet_length,
thd->host_or_ip, thd->user, thd->priv_user,
passwd_len ? "yes": "no",
@@ -857,7 +857,7 @@ static int check_connection(THD *thd)
if (thd->client_capabilities & CLIENT_IGNORE_SPACE)
thd->variables.sql_mode|= MODE_IGNORE_SPACE;
#ifdef HAVE_OPENSSL
- DBUG_PRINT("info", ("client capabilities: %d", thd->client_capabilities));
+ DBUG_PRINT("info", ("client capabilities: %lu", thd->client_capabilities));
if (thd->client_capabilities & CLIENT_SSL)
{
/* Do the SSL layering. */
@@ -1003,7 +1003,7 @@ pthread_handler_decl(handle_one_connection,arg)
of handle_one_connection, which is thd. We need to know the
start of the stack so that we could check for stack overruns.
*/
- DBUG_PRINT("info", ("handle_one_connection called by thread %d\n",
+ DBUG_PRINT("info", ("handle_one_connection called by thread %lu\n",
thd->thread_id));
// now that we've called my_thread_init(), it is safe to call DBUG_*
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc
index b5aed0bbc4e..9b6d6bdd92e 100644
--- a/sql/sql_prepare.cc
+++ b/sql/sql_prepare.cc
@@ -1394,7 +1394,7 @@ static int send_prepare_results(Prepared_statement *stmt, bool text_protocol)
enum enum_sql_command sql_command= lex->sql_command;
int res= 0;
DBUG_ENTER("send_prepare_results");
- DBUG_PRINT("enter",("command: %d, param_count: %ld",
+ DBUG_PRINT("enter",("command: %d param_count: %u",
sql_command, stmt->param_count));
if ((&lex->select_lex != lex->all_selects_list ||
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index f83313a8fd8..9d35d822b8e 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -1017,7 +1017,7 @@ int change_master(THD* thd, MASTER_INFO* mi)
{
mi->master_log_pos= lex_mi->pos;
}
- DBUG_PRINT("info", ("master_log_pos: %d", (ulong) mi->master_log_pos));
+ DBUG_PRINT("info", ("master_log_pos: %lu", (ulong) mi->master_log_pos));
if (lex_mi->host)
strmake(mi->host, lex_mi->host, sizeof(mi->host)-1);
@@ -1129,7 +1129,7 @@ int change_master(THD* thd, MASTER_INFO* mi)
}
}
mi->rli.group_master_log_pos = mi->master_log_pos;
- DBUG_PRINT("info", ("master_log_pos: %d", (ulong) mi->master_log_pos));
+ DBUG_PRINT("info", ("master_log_pos: %lu", (ulong) mi->master_log_pos));
/*
Coordinates in rli were spoilt by the 'if (need_relay_log_purge)' block,
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index af3ad782ee3..b4d9749911a 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -6052,6 +6052,7 @@ do_select(JOIN *join,List<Item> *fields,TABLE *table,Procedure *procedure)
JOIN_TAB *join_tab;
int (*end_select)(JOIN *, struct st_join_table *,bool);
DBUG_ENTER("do_select");
+ LINT_INIT(join_tab);
List<Item> *columns_list= procedure ? &join->procedure_fields_list : fields;
join->procedure=procedure;
/*
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 0316d6a3c10..3e9323ec086 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -2711,7 +2711,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
enum enum_duplicates handle_duplicates, bool ignore)
{
TABLE *table,*new_table;
- int error;
+ int error= 0;
char tmp_name[80],old_name[32],new_name_buff[FN_REFLEN];
char new_alias_buff[FN_REFLEN], *table_name, *db, *new_alias, *alias;
char index_file[FN_REFLEN], data_file[FN_REFLEN];
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index 7ed1b48d7aa..fcce3ad64b3 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -407,7 +407,7 @@ int mysql_update(THD *thd,
send_ok(thd,
(thd->client_capabilities & CLIENT_FOUND_ROWS) ? found : updated,
thd->insert_id_used ? thd->last_insert_id : 0L,buff);
- DBUG_PRINT("info",("%d records updated",updated));
+ DBUG_PRINT("info",("%lu records updated", (ulong) updated));
}
thd->count_cuted_fields= CHECK_FIELD_IGNORE; /* calc cuted fields */
free_io_cache(table);
@@ -495,7 +495,7 @@ static table_map get_table_map(List<Item> *items)
while ((item= (Item_field *) item_it++))
map|= item->used_tables();
- DBUG_PRINT("info",("table_map: 0x%08x", map));
+ DBUG_PRINT("info",("table_map: 0x%08lx", (long) map));
return map;
}
diff --git a/sql/strfunc.cc b/sql/strfunc.cc
index 81aca092cec..1b718e511ad 100644
--- a/sql/strfunc.cc
+++ b/sql/strfunc.cc
@@ -150,7 +150,7 @@ uint find_type2(TYPELIB *typelib, const char *x, uint length, CHARSET_INFO *cs)
int find,pos;
const char *j;
DBUG_ENTER("find_type2");
- DBUG_PRINT("enter",("x: '%s' lib: 0x%lx",x,typelib));
+ DBUG_PRINT("enter",("x: '%s' lib: 0x%lx",x, (long) typelib));
if (!typelib->count)
{
diff --git a/sql/table.cc b/sql/table.cc
index a85da8395e7..c1d43af2eec 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -87,7 +87,7 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag,
SQL_CRYPT *crypted=0;
MEM_ROOT **root_ptr, *old_root;
DBUG_ENTER("openfrm");
- DBUG_PRINT("enter",("name: '%s' form: %lx",name,outparam));
+ DBUG_PRINT("enter",("name: '%s' form: 0x%lx", name, (ulong) outparam));
bzero((char*) outparam,sizeof(*outparam));
outparam->blob_ptr_size=sizeof(char*);
diff --git a/sql/tztime.cc b/sql/tztime.cc
index 9af33526c98..bfbc1ae0b30 100644
--- a/sql/tztime.cc
+++ b/sql/tztime.cc
@@ -948,8 +948,8 @@ TIME_to_gmt_sec(const TIME *t, const TIME_ZONE_INFO *sp, bool *in_dst_time_gap)
*/
if (shift)
{
- if (local_t > (TIMESTAMP_MAX_VALUE - shift*86400L +
- sp->revtis[i].rt_offset - saved_seconds))
+ if (local_t > (my_time_t) (TIMESTAMP_MAX_VALUE - shift*86400L +
+ sp->revtis[i].rt_offset - saved_seconds))
{
DBUG_RETURN(0); /* my_time_t overflow */
}
diff --git a/sql/unireg.cc b/sql/unireg.cc
index e5ee0222f20..c9c39f38842 100644
--- a/sql/unireg.cc
+++ b/sql/unireg.cc
@@ -358,14 +358,14 @@ static uint pack_keys(uchar *keybuff, uint key_count, KEY *keyinfo,
key_parts+=key->key_parts;
DBUG_PRINT("loop",("flags: %d key_parts: %d at %lx",
key->flags,key->key_parts,
- key->key_part));
+ (long) key->key_part));
for (key_part=key->key_part,key_part_end=key_part+key->key_parts ;
key_part != key_part_end ;
key_part++)
{
uint offset;
- DBUG_PRINT("loop",("field: %d startpos: %lu length: %ld",
+ DBUG_PRINT("loop",("field: %d startpos: %lu length: %d",
key_part->fieldnr, key_part->offset + data_offset,
key_part->length));
int2store(pos,key_part->fieldnr+1+FIELD_NAME_USED);
diff --git a/support-files/compiler_warnings.supp b/support-files/compiler_warnings.supp
new file mode 100644
index 00000000000..b18c925dae1
--- /dev/null
+++ b/support-files/compiler_warnings.supp
@@ -0,0 +1,56 @@
+#
+# cmd-line-utils is not important in 4.1
+#
+.*/cmd-line-utils/readline/* : .*comparison is always true.*
+.*/cmd-line-utils/readline/* : .*discards qualifiers from pointer target type.*
+.*/cmd-line-utils/readline/* : .*may be used uninitialized in this.*
+
+#
+# not important in 4.1
+#
+my_tempnam.c: .*the use of `tempnam' is dangerous, better use `mkstemp'.*
+
+#
+# bdb is not critical to keep up to date
+#
+.*/bdb/.* : .*discards qualifiers from pointer target type.*
+.*/bdb/.* : .*unused parameter.*
+.*/bdb/.* : .*may be used uninitialized.*
+.*/bdb/.* : .*empty body in an if-statement.*
+db_vrfy.c : .*comparison is always false due to limited range of data type.*
+
+#
+# Ignore all conversion warnings on windows 64
+# (Is safe as we are not yet supporting strings >= 2G)
+#
+.* : conversion from '__int64' to .*int'.*
+.* : conversion from '__int64' to 'uint8'.*
+.* : conversion from '__int64' to 'uint32'.*
+.* : conversion from '__int64' to 'u.*long'.*
+.* : conversion from '__int64' to 'long'.*
+.* : conversion from '__int64' to 'off_t'.*
+.* : conversion from '.*size_t' to .*int'.*
+.* : conversion from '.*size_t' to 'TaoCrypt::word32'.*
+.* : conversion from '.*size_t' to 'u.*long'.*
+.* : conversion from '.*size_t' to 'uint32'.*
+.* : conversion from '.*size_t' to 'off_t'.*
+.* : conversion from '.*size_t' to 'size_s'.*
+
+#
+# innobase is not critical in 4.1 to be kept up-to-date
+#
+.*/innobase/.* : .*unused parameter.*
+.*/innobase/.* : .*may be used uninitialized in.*
+
+#
+# The following should be fixed by the ndb team
+#
+.*/ndb/.* : .*used uninitialized in this function.*
+.*/ndb/.* : .*unused variable.*
+.*/ndb/.* : .*defined but not used.*
+.*/ndb/.* : .*format.*expects type.*
+.*/ndb/.* : .*has virtual functions but non-virtual destructor.*
+.*/ndb/.* : .*comparison between signed and unsigned integer expressions.*
+.*/ndb/.* : .*deprecated conversion from string constant to.*
+.*/ndb/.* : .*enumeration value.*not handled in switch.*
+.*/ndb/.* : .*enumeral and non-enumeral type in conditional expression.*
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index 98d7182d46f..fb2dc879c28 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -767,6 +767,7 @@ static void verify_field_count(MYSQL_RES *result, uint exp_count)
/* Utility function to execute a query using prepare-execute */
+#ifndef EMBEDDED_LIBRARY
static void execute_prepare_query(const char *query, ulonglong exp_count)
{
MYSQL_STMT *stmt;
@@ -787,7 +788,7 @@ static void execute_prepare_query(const char *query, ulonglong exp_count)
DIE_UNLESS(affected_rows == exp_count);
mysql_stmt_close(stmt);
}
-
+#endif
/* Store result processing */
@@ -11716,6 +11717,7 @@ static void test_bug12001()
DIE_UNLESS(res==1);
}
+#ifndef EMBEDDED_LIBRARY
static void test_bug12744()
{
MYSQL_STMT *prep_stmt = NULL;
@@ -11746,6 +11748,7 @@ static void test_bug12744()
}
rc= mysql_stmt_close(prep_stmt);
}
+#endif
/*
Bug#11718: query with function, join and order by returns wrong type