List:Commits« Previous MessageNext Message »
From:jani Date:March 22 2007 12:14pm
Subject:bk commit into 4.1 tree (jani:1.2623)
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of jani. When jani does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-03-22 13:14:08+02:00, jani@stripped +89 -0
  Fixed compiler warnings.

  client/mysqlbinlog.cc@stripped, 2007-03-22 13:14:02+02:00, jani@stripped
+1 -1
    Fixed compiler warnings.

  client/mysqldump.c@stripped, 2007-03-22 13:14:02+02:00, jani@stripped +1
-1
    Fixed compiler warnings.

  client/sql_string.cc@stripped, 2007-03-22 13:14:02+02:00, jani@stripped
+2 -2
    Fixed compiler warnings.

  extra/perror.c@stripped, 2007-03-22 13:14:02+02:00, jani@stripped +3 -1
    Fixed compiler warnings.

  heap/_check.c@stripped, 2007-03-22 13:14:02+02:00, jani@stripped +5 -5
    Fixed compiler warnings.

  heap/hp_delete.c@stripped, 2007-03-22 13:14:02+02:00, jani@stripped +2 -2
    Fixed compiler warnings.

  heap/hp_hash.c@stripped, 2007-03-22 13:14:02+02:00, jani@stripped +1 -1
    Fixed compiler warnings.

  heap/hp_open.c@stripped, 2007-03-22 13:14:02+02:00, jani@stripped +3 -2
    Fixed compiler warnings.

  heap/hp_rkey.c@stripped, 2007-03-22 13:14:02+02:00, jani@stripped +1 -1
    Fixed compiler warnings.

  heap/hp_rrnd.c@stripped, 2007-03-22 13:14:02+02:00, jani@stripped +2 -2
    Fixed compiler warnings.

  heap/hp_write.c@stripped, 2007-03-22 13:14:02+02:00, jani@stripped +2 -2
    Fixed compiler warnings.

  include/raid.h@stripped, 2007-03-22 13:14:02+02:00, jani@stripped +2 -2
    Fixed compiler warnings.

  isam/_dynrec.c@stripped, 2007-03-22 13:14:02+02:00, jani@stripped +1 -1
    Fixed compiler warnings.

  isam/_page.c@stripped, 2007-03-22 13:14:02+02:00, jani@stripped +2 -2
    Fixed compiler warnings.

  isam/_search.c@stripped, 2007-03-22 13:14:02+02:00, jani@stripped +8 -7
    Fixed compiler warnings.

  isam/close.c@stripped, 2007-03-22 13:14:03+02:00, jani@stripped +2 -2
    Fixed compiler warnings.

  isam/delete.c@stripped, 2007-03-22 13:14:03+02:00, jani@stripped +6 -3
    Fixed compiler warnings.

  isam/open.c@stripped, 2007-03-22 13:14:03+02:00, jani@stripped +1 -1
    Fixed compiler warnings.

  isam/rkey.c@stripped, 2007-03-22 13:14:03+02:00, jani@stripped +1 -1
    Fixed compiler warnings.

  isam/sort.c@stripped, 2007-03-22 13:14:03+02:00, jani@stripped +1 -1
    Fixed compiler warnings.

  isam/write.c@stripped, 2007-03-22 13:14:03+02:00, jani@stripped +6 -4
    Fixed compiler warnings.

  libmysql/libmysql.c@stripped, 2007-03-22 13:14:03+02:00, jani@stripped
+6 -6
    Fixed compiler warnings.

  libmysqld/libmysqld.c@stripped, 2007-03-22 13:14:03+02:00, jani@stripped
+1 -1
    Fixed compiler warnings.

  myisam/mi_close.c@stripped, 2007-03-22 13:14:03+02:00, jani@stripped +2
-1
    Fixed compiler warnings.

  myisam/mi_delete.c@stripped, 2007-03-22 13:14:03+02:00, jani@stripped +6
-5
    Fixed compiler warnings.

  myisam/mi_dynrec.c@stripped, 2007-03-22 13:14:03+02:00, jani@stripped +2
-1
    Fixed compiler warnings.

  myisam/mi_keycache.c@stripped, 2007-03-22 13:14:03+02:00, jani@stripped +1
-1
    Fixed compiler warnings.

  myisam/mi_page.c@stripped, 2007-03-22 13:14:03+02:00, jani@stripped +2 -2
    Fixed compiler warnings.

  myisam/mi_statrec.c@stripped, 2007-03-22 13:14:03+02:00, jani@stripped +1
-1
    Fixed compiler warnings.

  myisam/myisamchk.c@stripped, 2007-03-22 13:14:03+02:00, jani@stripped +1
-0
    Fixed compiler warnings.

  myisammrg/myrg_extra.c@stripped, 2007-03-22 13:14:03+02:00, jani@stripped
+1 -1
    Fixed compiler warnings.

  mysys/default.c@stripped, 2007-03-22 13:14:03+02:00, jani@stripped +1 -1
    Fixed bug.

  mysys/hash.c@stripped, 2007-03-22 13:14:03+02:00, jani@stripped +9 -7
    Fixed compiler warnings.

  mysys/list.c@stripped, 2007-03-22 13:14:03+02:00, jani@stripped +1 -1
    Fixed compiler warnings.

  mysys/mf_iocache.c@stripped, 2007-03-22 13:14:03+02:00, jani@stripped +7
-4
    Fixed compiler warnings.

  mysys/mf_keycache.c@stripped, 2007-03-22 13:14:03+02:00, jani@stripped
+15 -15
    Fixed compiler warnings.

  mysys/mf_keycaches.c@stripped, 2007-03-22 13:14:03+02:00, jani@stripped +2
-2
    Fixed compiler warnings.

  mysys/my_alloc.c@stripped, 2007-03-22 13:14:03+02:00, jani@stripped +3 -2
    Fixed compiler warnings.

  mysys/my_dup.c@stripped, 2007-03-22 13:14:03+02:00, jani@stripped +1 -1
    Fixed compiler warnings.

  mysys/my_fopen.c@stripped, 2007-03-22 13:14:03+02:00, jani@stripped +3 -3
    Fixed compiler warnings.

  mysys/my_fstream.c@stripped, 2007-03-22 13:14:03+02:00, jani@stripped +4
-4
    Fixed compiler warnings.

  mysys/my_getwd.c@stripped, 2007-03-22 13:14:03+02:00, jani@stripped +2 -1
    Fixed compiler warnings.

  mysys/my_handler.c@stripped, 2007-03-22 13:14:03+02:00, jani@stripped +4
-1
    Fixed compiler warnings.

  mysys/my_lib.c@stripped, 2007-03-22 13:14:03+02:00, jani@stripped +1 -1
    Fixed compiler warnings.

  mysys/my_lread.c@stripped, 2007-03-22 13:14:03+02:00, jani@stripped +2 -2
    Fixed compiler warnings.

  mysys/my_lwrite.c@stripped, 2007-03-22 13:14:03+02:00, jani@stripped +2 -2
    Fixed compiler warnings.

  mysys/my_malloc.c@stripped, 2007-03-22 13:14:03+02:00, jani@stripped +2
-2
    Fixed compiler warnings.

  mysys/my_pread.c@stripped, 2007-03-22 13:14:04+02:00, jani@stripped +4 -4
    Fixed compiler warnings.

  mysys/my_read.c@stripped, 2007-03-22 13:14:04+02:00, jani@stripped +2 -2
    Fixed compiler warnings.

  mysys/my_realloc.c@stripped, 2007-03-22 13:14:04+02:00, jani@stripped +3
-3
    Fixed compiler warnings.

  mysys/my_seek.c@stripped, 2007-03-22 13:14:04+02:00, jani@stripped +1 -1
    Fixed compiler warnings.

  mysys/my_tempnam.c@stripped, 2007-03-22 13:14:04+02:00, jani@stripped +1
-1
    Fixed compiler warnings.

  mysys/my_write.c@stripped, 2007-03-22 13:14:04+02:00, jani@stripped +1 -1
    Fixed compiler warnings.

  mysys/raid.cc@stripped, 2007-03-22 13:14:04+02:00, jani@stripped +18 -17
    Fixed compiler warnings.

  mysys/safemalloc.c@stripped, 2007-03-22 13:14:04+02:00, jani@stripped +5
-5
    Fixed compiler warnings.

  mysys/thr_lock.c@stripped, 2007-03-22 13:14:04+02:00, jani@stripped +8 -7
    Fixed compiler warnings.

  mysys/tree.c@stripped, 2007-03-22 13:14:04+02:00, jani@stripped +2 -2
    Fixed compiler warnings.

  mysys/typelib.c@stripped, 2007-03-22 13:14:04+02:00, jani@stripped +1 -1
    Fixed compiler warnings.

  ndb/src/mgmclient/CommandInterpreter.cpp@stripped, 2007-03-22 13:14:04+02:00,
jani@stripped +2 -2
    Added parenthesis around the expression.

  regex/regexec.c@stripped, 2007-03-22 13:14:04+02:00, jani@stripped +2 -1
    Fixed compiler warnings.

  sql-common/client.c@stripped, 2007-03-22 13:14:05+02:00, jani@stripped +6
-6
    Fixed compiler warnings.

  sql-common/my_time.c@stripped, 2007-03-22 13:14:05+02:00, jani@stripped
+1 -1
    Removed garbage.

  sql/examples/ha_archive.cc@stripped, 2007-03-22 13:14:05+02:00,
jani@stripped +2 -1
    Fixed compiler warnings.

  sql/ha_innodb.cc@stripped, 2007-03-22 13:14:04+02:00, jani@stripped +2
-2
    Fixed compiler warnings.

  sql/ha_ndbcluster.cc@stripped, 2007-03-22 13:14:04+02:00, jani@stripped
+13 -11
    Fixed compiler warnings.

  sql/item.cc@stripped, 2007-03-22 13:14:04+02:00, jani@stripped +2 -0
    Fixed compiler warnings.

  sql/item_cmpfunc.cc@stripped, 2007-03-22 13:14:04+02:00, jani@stripped
+2 -2
    Fixed compiler warnings.

  sql/item_subselect.cc@stripped, 2007-03-22 13:14:04+02:00, jani@stripped
+1 -1
    Fixed compiler warnings.

  sql/log.cc@stripped, 2007-03-22 13:14:04+02:00, jani@stripped +2 -2
    Fixed compiler warnings.

  sql/log_event.cc@stripped, 2007-03-22 13:14:04+02:00, jani@stripped +2
-2
    Fixed compiler warnings.

  sql/mysqld.cc@stripped, 2007-03-22 13:14:04+02:00, jani@stripped +5 -4
    Fixed compiler warnings.
    
    Added a missing component in options struct (bug).

  sql/net_serv.cc@stripped, 2007-03-22 13:14:04+02:00, jani@stripped +1 -1
    Fixed compiler warnings.

  sql/opt_range.cc@stripped, 2007-03-22 13:14:04+02:00, jani@stripped +1
-1
    Fixed compiler warnings.

  sql/slave.cc@stripped, 2007-03-22 13:14:05+02:00, jani@stripped +6 -6
    Fixed compiler warnings.

  sql/sql_cache.cc@stripped, 2007-03-22 13:14:05+02:00, jani@stripped +7 -7
    Fixed compiler warnings.

  sql/sql_class.cc@stripped, 2007-03-22 13:14:05+02:00, jani@stripped +5
-6
    Fixed compiler warnings.

  sql/sql_delete.cc@stripped, 2007-03-22 13:14:05+02:00, jani@stripped +1
-1
    Fixed compiler warnings.

  sql/sql_parse.cc@stripped, 2007-03-22 13:14:05+02:00, jani@stripped +4
-4
    Fixed compiler warnings.

  sql/sql_prepare.cc@stripped, 2007-03-22 13:14:05+02:00, jani@stripped +1
-1
    Fixed compiler warnings.

  sql/sql_repl.cc@stripped, 2007-03-22 13:14:05+02:00, jani@stripped +2 -2
    Fixed compiler warnings.

  sql/sql_select.cc@stripped, 2007-03-22 13:14:05+02:00, jani@stripped +1
-0
    Fixed compiler warnings.

  sql/sql_table.cc@stripped, 2007-03-22 13:14:05+02:00, jani@stripped +1
-1
    A possible use of a variable uninitialized.

  sql/sql_update.cc@stripped, 2007-03-22 13:14:05+02:00, jani@stripped +2
-2
    Fixed compiler warnings.

  sql/strfunc.cc@stripped, 2007-03-22 13:14:05+02:00, jani@stripped +1 -1
    Fixed compiler warnings.

  sql/table.cc@stripped, 2007-03-22 13:14:05+02:00, jani@stripped +1 -1
    Fixed compiler warnings.

  sql/tztime.cc@stripped, 2007-03-22 13:14:05+02:00, jani@stripped +2 -2
    Fixed compiler warnings.

  sql/unireg.cc@stripped, 2007-03-22 13:14:05+02:00, jani@stripped +2 -2
    Fixed compiler warnings.

  support-files/compiler_warnings.supp@stripped, 2007-03-22 13:13:36+02:00,
jani@stripped +56 -0
    BitKeeper file /home/my/bk/mysql-4.1-main/support-files/compiler_warnings.supp

  support-files/compiler_warnings.supp@stripped, 2007-03-22 13:13:36+02:00,
jani@stripped +0 -0

  tests/mysql_client_test.c@stripped, 2007-03-22 13:14:05+02:00,
jani@stripped +4 -1
    Fixed compiler warnings.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	jani
# Host:	ua141d10.elisa.omakaista.fi
# Root:	/home/my/bk/mysql-4.1-main

--- 1.205/client/mysqldump.c	2007-03-22 13:14:16 +02:00
+++ 1.206/client/mysqldump.c	2007-03-22 13:14:16 +02:00
@@ -2654,7 +2654,7 @@
   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);

--- 1.23/client/sql_string.cc	2007-03-22 13:14:16 +02:00
+++ 1.24/client/sql_string.cc	2007-03-22 13:14:16 +02:00
@@ -103,7 +103,7 @@
   }
   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 @@
   }
   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;

--- 1.40/extra/perror.c	2007-03-22 13:14:16 +02:00
+++ 1.41/extra/perror.c	2007-03-22 13:14:16 +02:00
@@ -253,7 +253,9 @@
         '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;

--- 1.17/heap/_check.c	2007-03-22 13:14:16 +02:00
+++ 1.18/heap/_check.c	2007-03-22 13:14:16 +02:00
@@ -87,7 +87,7 @@
 
   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 @@
 			        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 @@
   }
   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 @@
       {
 	error= 1;
 	DBUG_PRINT("error",("Record in wrong link:  key: %d  Record: %lx\n", 
-			    keynr, recpos));
+			    keynr, (ulong) recpos));
       }
       else
 	found++;

--- 1.14/heap/hp_delete.c	2007-03-22 13:14:16 +02:00
+++ 1.15/heap/hp_delete.c	2007-03-22 13:14:16 +02:00
@@ -24,7 +24,7 @@
   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 @@
     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)

--- 1.36/heap/hp_hash.c	2007-03-22 13:14:16 +02:00
+++ 1.37/heap/hp_hash.c	2007-03-22 13:14:16 +02:00
@@ -120,7 +120,7 @@
       {
 	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 */

--- 1.20/heap/hp_open.c	2007-03-22 13:14:16 +02:00
+++ 1.21/heap/hp_open.c	2007-03-22 13:14:16 +02:00
@@ -64,7 +64,8 @@
   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));
+		     (ulong) info, share->reclength,
+                     share->block.records_in_block));
   DBUG_RETURN(info);
 }
 
@@ -82,7 +83,7 @@
     info= (HP_SHARE*) pos->data;
     if (!strcmp(name, info->name))
     {
-      DBUG_PRINT("exit", ("Old heap_database: %lx",info));
+      DBUG_PRINT("exit", ("Old heap_database: %lx", (ulong) info));
       DBUG_RETURN(info);
     }
   }

--- 1.13/heap/hp_rkey.c	2007-03-22 13:14:16 +02:00
+++ 1.14/heap/hp_rkey.c	2007-03-22 13:14:16 +02:00
@@ -23,7 +23,7 @@
   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: %lx  inx: %d", (ulong) info, inx));
 
   if ((uint) inx >= share->keys)
   {

--- 1.7/heap/hp_rrnd.c	2007-03-22 13:14:16 +02:00
+++ 1.8/heap/hp_rrnd.c	2007-03-22 13:14:16 +02:00
@@ -29,7 +29,7 @@
 {
   HP_SHARE *share=info->s;
   DBUG_ENTER("heap_rrnd");
-  DBUG_PRINT("enter",("info: %lx  pos: %lx",info,pos));
+  DBUG_PRINT("enter",("info: %lx  pos: %lx", (ulong) info, (ulong) pos));
 
   info->lastinx= -1;
   if (!(info->current_ptr= pos))
@@ -44,7 +44,7 @@
   }
   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 %lx", (ulong) info->current_ptr));
   info->current_hash_ptr=0;			/* Can't use rnext */
   DBUG_RETURN(0);
 } /* heap_rrnd */

--- 1.21/heap/hp_write.c	2007-03-22 13:14:16 +02:00
+++ 1.22/heap/hp_write.c	2007-03-22 13:14:16 +02:00
@@ -144,7 +144,7 @@
     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: %lx", (ulong) pos));
     DBUG_RETURN(pos);
   }
   if (!(block_pos=(info->records % info->block.records_in_block)))
@@ -160,7 +160,7 @@
     info->data_length+=length;
   }
   DBUG_PRINT("exit",("Used new position: %lx",
-		     (byte*) info->block.level_info[0].last_blocks+block_pos*
+		     (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);

--- 1.19/include/raid.h	2007-03-22 13:14:16 +02:00
+++ 1.20/include/raid.h	2007-03-22 13:14:16 +02:00
@@ -141,7 +141,7 @@
     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 @@
       _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;
     }

--- 1.10/isam/_dynrec.c	2007-03-22 13:14:16 +02:00
+++ 1.11/isam/_dynrec.c	2007-03-22 13:14:16 +02:00
@@ -714,7 +714,7 @@
  err:
   my_errno=HA_ERR_RECORD_DELETED;
   DBUG_PRINT("error",("to_end: %lx -> %lx  from_end: %lx -> %lx",
-		      to,to_end,from,from_end));
+                      (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 */

--- 1.10/isam/_page.c	2007-03-22 13:14:16 +02:00
+++ 1.11/isam/_page.c	2007-03-22 13:14:16 +02:00
@@ -70,7 +70,7 @@
     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 @@
 			(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 */

--- 1.14/isam/_search.c	2007-03-22 13:14:16 +02:00
+++ 1.15/isam/_search.c	2007-03-22 13:14:16 +02:00
@@ -208,14 +208,15 @@
     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: %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: %lx", flag, (long) *ret_pos));
   DBUG_RETURN(flag);
 } /* _nisam_seq_search */
 
@@ -754,8 +755,8 @@
   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: %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 @@
   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 @@
   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 @@
   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 */

--- 1.8/isam/close.c	2007-03-22 13:14:16 +02:00
+++ 1.9/isam/close.c	2007-03-22 13:14:16 +02:00
@@ -24,8 +24,8 @@
   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)));
+                      (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)

--- 1.8/isam/delete.c	2007-03-22 13:14:16 +02:00
+++ 1.9/isam/delete.c	2007-03-22 13:14:16 +02:00
@@ -258,7 +258,8 @@
   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: %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 @@
   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: %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 @@
   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: %lx  page_end: %lx",
+                      (long) keypos, (long) page_end));
 
   start=keypos;
   if (!(keyinfo->base.flag & (HA_PACK_KEY | HA_SPACE_PACK_USED)))

--- 1.14/isam/open.c	2007-03-22 13:14:16 +02:00
+++ 1.15/isam/open.c	2007-03-22 13:14:16 +02:00
@@ -116,7 +116,7 @@
 	  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;
     }

--- 1.5/isam/rkey.c	2007-03-22 13:14:16 +02:00
+++ 1.6/isam/rkey.c	2007-03-22 13:14:16 +02:00
@@ -28,7 +28,7 @@
   ISAM_SHARE *share=info->s;
   DBUG_ENTER("nisam_rkey");
   DBUG_PRINT("enter",("base: %lx  inx: %d  search_flag: %d",
-		      info,inx,search_flag));
+		      (long) info, inx, search_flag));
 
   if ((inx = _nisam_check_index(info,inx)) < 0)
     DBUG_RETURN(-1);

--- 1.10/isam/sort.c	2007-03-22 13:14:16 +02:00
+++ 1.11/isam/sort.c	2007-03-22 13:14:16 +02:00
@@ -542,7 +542,7 @@
 #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: %lx", (long) stream));
   DBUG_RETURN (stream);
 } /* opentemp */
 

--- 1.11/isam/write.c	2007-03-22 13:14:16 +02:00
+++ 1.12/isam/write.c	2007-03-22 13:14:16 +02:00
@@ -226,7 +226,7 @@
   int key_offset;
   S_PARAM s_temp;
   DBUG_ENTER("_nisam_insert");
-  DBUG_PRINT("enter",("key_pos: %lx",key_pos));
+  DBUG_PRINT("enter",("key_pos: %lx", (long) key_pos));
   DBUG_EXECUTE("key",_nisam_print_key(DBUG_FILE,keyinfo->seg,key););
 
   nod_flag=test_if_nod(anc_buff);
@@ -244,7 +244,8 @@
     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));
+                       s_temp.n_ref_length, s_temp.n_length,
+                       (long) s_temp.key));
   }
 #endif
   key_offset = (uint)(endpos-key_pos);
@@ -597,7 +598,7 @@
       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: %lx", length, (long) key_pos));
 
     key=start+ref_length;
     while (n_length > 0 && key < key_end && *key == *key_pos)
@@ -696,7 +697,8 @@
     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: %lx  page: %lx  half: %lx",
+                      (long) lastpos, (long) page, (long) end));
    DBUG_RETURN(lastpos);
 } /* _nisam_find_half_pos */
 

--- 1.306/libmysql/libmysql.c	2007-03-22 13:14:16 +02:00
+++ 1.307/libmysql/libmysql.c	2007-03-22 13:14:16 +02:00
@@ -2124,7 +2124,7 @@
   }
   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,9 @@
 {
   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 : "0"), *param->length,
 		      *param->is_null));
 
   if (*param->is_null)
@@ -2499,7 +2499,7 @@
   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 */
@@ -3240,7 +3240,7 @@
   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));
+		      param_number, (ulong) data, length));
 
   /*
     We only need to check for stmt->param_count, if it's not null
@@ -3960,7 +3960,7 @@
   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)
   {

--- 1.18/myisam/mi_close.c	2007-03-22 13:14:16 +02:00
+++ 1.19/myisam/mi_close.c	2007-03-22 13:14:16 +02:00
@@ -29,7 +29,8 @@
   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));
+		      (long) info, (uint) share->reopen,
+                      (uint) share->tot_locks));
 
   pthread_mutex_lock(&THR_LOCK_myisam);
   if (info->lock_type == F_EXTRA_LCK)

--- 1.35/myisam/mi_delete.c	2007-03-22 13:14:16 +02:00
+++ 1.36/myisam/mi_delete.c	2007-03-22 13:14:16 +02:00
@@ -152,7 +152,7 @@
     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 @@
   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 @@
     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: %lx  endpos: %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 @@
   int s_length;
   uchar *start;
   DBUG_ENTER("remove_key");
-  DBUG_PRINT("enter",("keypos: %lx  page_end: %lx",keypos,page_end));
-
+  DBUG_PRINT("enter",("keypos: %lx  page_end: %lx", (long) keypos,
+                      (long) page_end));
   start=keypos;
   if (!(keyinfo->flag &
 	(HA_PACK_KEY | HA_SPACE_PACK_USED | HA_VAR_LENGTH_KEY |

--- 1.42/myisam/mi_dynrec.c	2007-03-22 13:14:16 +02:00
+++ 1.43/myisam/mi_dynrec.c	2007-03-22 13:14:16 +02:00
@@ -1030,7 +1030,8 @@
 err:
   my_errno=HA_ERR_RECORD_DELETED;
   DBUG_PRINT("error",("to_end: %lx -> %lx  from_end: %lx -> %lx",
-		      to,to_end,from,from_end));
+		      (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 */

--- 1.20/myisam/mi_page.c	2007-03-22 13:14:16 +02:00
+++ 1.21/myisam/mi_page.c	2007-03-22 13:14:16 +02:00
@@ -27,7 +27,7 @@
   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 @@
     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
 

--- 1.10/myisam/mi_statrec.c	2007-03-22 13:14:16 +02:00
+++ 1.11/myisam/mi_statrec.c	2007-03-22 13:14:16 +02:00
@@ -254,7 +254,7 @@
   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);

--- 1.130/myisam/myisamchk.c	2007-03-22 13:14:16 +02:00
+++ 1.131/myisam/myisamchk.c	2007-03-22 13:14:16 +02:00
@@ -721,6 +721,7 @@
     case 2:
       method_conv= MI_STATS_METHOD_IGNORE_NULLS;
       break;
+    default: assert(0);                         /* Impossible */
     }
     check_param.stats_method= method_conv;
     break;

--- 1.12/myisammrg/myrg_extra.c	2007-03-22 13:14:16 +02:00
+++ 1.13/myisammrg/myrg_extra.c	2007-03-22 13:14:16 +02:00
@@ -28,7 +28,7 @@
   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)
   {

--- 1.53/mysys/default.c	2007-03-22 13:14:16 +02:00
+++ 1.54/mysys/default.c	2007-03-22 13:14:16 +02:00
@@ -491,7 +491,7 @@
           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;

--- 1.44/mysys/hash.c	2007-03-22 13:14:16 +02:00
+++ 1.45/mysys/hash.c	2007-03-22 13:14:16 +02:00
@@ -53,7 +53,7 @@
 	   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 @@
 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 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 @@
 	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 @@
   }
   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

--- 1.9/mysys/list.c	2007-03-22 13:14:17 +02:00
+++ 1.10/mysys/list.c	2007-03-22 13:14:17 +02:00
@@ -28,7 +28,7 @@
 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: %lx", (long) root, (long) element));
   if (root)
   {
     if (root->prev)			/* If add in mid of list */

--- 1.53/mysys/mf_iocache.c	2007-03-22 13:14:17 +02:00
+++ 1.54/mysys/mf_iocache.c	2007-03-22 13:14:17 +02:00
@@ -589,7 +589,9 @@
   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 @@
   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 @@
   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 @@
   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;

--- 1.53/mysys/mf_keycache.c	2007-03-22 13:14:17 +02:00
+++ 1.54/mysys/mf_keycache.c	2007-03-22 13:14:17 +02:00
@@ -410,9 +410,9 @@
     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 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 @@
     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 @@
       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 @@
         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 @@
 
   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 @@
   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 @@
   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 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);

--- 1.25/mysys/my_alloc.c	2007-03-22 13:14:17 +02:00
+++ 1.26/mysys/my_alloc.c	2007-03-22 13:14:17 +02:00
@@ -47,7 +47,7 @@
 		     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 @@
 {
   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 */

--- 1.15/mysys/my_fopen.c	2007-03-22 13:14:17 +02:00
+++ 1.16/mysys/my_fopen.c	2007-03-22 13:14:17 +02:00
@@ -79,7 +79,7 @@
       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 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 @@
     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 */
 

--- 1.8/mysys/my_fstream.c	2007-03-22 13:14:17 +02:00
+++ 1.9/mysys/my_fstream.c	2007-03-22 13:14:17 +02:00
@@ -40,7 +40,7 @@
   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 @@
 #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 @@
 {
   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 @@
 {
   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);

--- 1.16/mysys/my_getwd.c	2007-03-22 13:14:17 +02:00
+++ 1.17/mysys/my_getwd.c	2007-03-22 13:14:17 +02:00
@@ -45,7 +45,8 @@
 {
   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 */

--- 1.21/mysys/my_lib.c	2007-03-22 13:14:17 +02:00
+++ 1.22/mysys/my_lib.c	2007-03-22 13:14:17 +02:00
@@ -625,7 +625,7 @@
   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)))

--- 1.6/mysys/my_lread.c	2007-03-22 13:14:17 +02:00
+++ 1.7/mysys/my_lread.c	2007-03-22 13:14:17 +02:00
@@ -27,8 +27,8 @@
 {
   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: %ld  Count: %u  MyFlags: %d",
+		   Filedes, (long) Buffer, Count, MyFlags));
 
   DBUG_PRINT("error", ("Deprecated my_lread() function should not be used."));
 

--- 1.7/mysys/my_lwrite.c	2007-03-22 13:14:17 +02:00
+++ 1.8/mysys/my_lwrite.c	2007-03-22 13:14:17 +02:00
@@ -23,8 +23,8 @@
 {
   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."));
 

--- 1.9/mysys/my_malloc.c	2007-03-22 13:14:17 +02:00
+++ 1.10/mysys/my_malloc.c	2007-03-22 13:14:17 +02:00
@@ -44,7 +44,7 @@
   }
   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 @@
 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;

--- 1.11/mysys/my_pread.c	2007-03-22 13:14:17 +02:00
+++ 1.12/mysys/my_pread.c	2007-03-22 13:14:17 +02:00
@@ -30,7 +30,7 @@
   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 @@
     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 @@
   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 (;;)

--- 1.11/mysys/my_read.c	2007-03-22 13:14:17 +02:00
+++ 1.12/mysys/my_read.c	2007-03-22 13:14:17 +02:00
@@ -39,7 +39,7 @@
   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 @@
     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)

--- 1.7/mysys/my_realloc.c	2007-03-22 13:14:17 +02:00
+++ 1.8/mysys/my_realloc.c	2007-03-22 13:14:17 +02:00
@@ -27,8 +27,8 @@
 {
   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 @@
       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 */

--- 1.14/mysys/my_seek.c	2007-03-22 13:14:17 +02:00
+++ 1.15/mysys/my_seek.c	2007-03-22 13:14:17 +02:00
@@ -55,7 +55,7 @@
   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)

--- 1.16/mysys/my_tempnam.c	2007-03-22 13:14:17 +02:00
+++ 1.17/mysys/my_tempnam.c	2007-03-22 13:14:17 +02:00
@@ -106,7 +106,7 @@
 #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] == '\\')

--- 1.12/mysys/my_write.c	2007-03-22 13:14:17 +02:00
+++ 1.13/mysys/my_write.c	2007-03-22 13:14:17 +02:00
@@ -27,7 +27,7 @@
   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 (;;)

--- 1.34/mysys/raid.cc	2007-03-22 13:14:17 +02:00
+++ 1.35/mysys/raid.cc	2007-03-22 13:14:17 +02:00
@@ -185,8 +185,8 @@
   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 @@
   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 @@
 		     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 @@
 		      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 @@
 		   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))
@@ -285,7 +286,7 @@
   {
     DBUG_ENTER("my_raid_chsize");
     DBUG_PRINT("enter",("Fd: %d  newlength: %u  MyFlags: %d",
-		      fd, newlength, MyFlags));
+                        fd, (uint) newlength, MyFlags));
    if (is_raid(fd))
    {
      RaidFd *raid= (*dynamic_element(&RaidFd::_raid_map,fd,RaidFd**));
@@ -413,7 +414,7 @@
    _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 @@
 {
   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 @@
 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 @@
 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

--- 1.24/mysys/safemalloc.c	2007-03-22 13:14:17 +02:00
+++ 1.25/mysys/safemalloc.c	2007-03-22 13:14:17 +02:00
@@ -194,7 +194,7 @@
   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 @@
 {
   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 @@
       }
       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 @@
     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 @@
     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;

--- 1.42/mysys/thr_lock.c	2007-03-22 13:14:17 +02:00
+++ 1.43/mysys/thr_lock.c	2007-03-22 13:14:17 +02:00
@@ -436,7 +436,8 @@
   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 @@
 	  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 @@
   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 @@
 {
   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 @@
 {
   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 @@
     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;

--- 1.27/mysys/tree.c	2007-03-22 13:14:17 +02:00
+++ 1.28/mysys/tree.c	2007-03-22 13:14:17 +02:00
@@ -89,7 +89,7 @@
 	       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 @@
 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 */
   {

--- 1.13/mysys/typelib.c	2007-03-22 13:14:17 +02:00
+++ 1.14/mysys/typelib.c	2007-03-22 13:14:17 +02:00
@@ -49,7 +49,7 @@
   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)
   {

--- 1.7/regex/regexec.c	2007-03-22 13:14:17 +02:00
+++ 1.8/regex/regexec.c	2007-03-22 13:14:17 +02:00
@@ -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

--- 1.238/sql/item.cc	2007-03-22 13:14:17 +02:00
+++ 1.239/sql/item.cc	2007-03-22 13:14:17 +02:00
@@ -649,6 +649,8 @@
       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];

--- 1.219/sql/item_cmpfunc.cc	2007-03-22 13:14:17 +02:00
+++ 1.220/sql/item_cmpfunc.cc	2007-03-22 13:14:17 +02:00
@@ -1820,7 +1820,7 @@
 cmp_item_row::~cmp_item_row()
 {
   DBUG_ENTER("~cmp_item_row");
-  DBUG_PRINT("enter",("this: %lx", this));
+  DBUG_PRINT("enter",("this: %lx", (long) this));
   if (comparators)
   {
     for (uint i= 0; i < n; i++)
@@ -2413,7 +2413,7 @@
   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())

--- 1.167/sql/log.cc	2007-03-22 13:14:17 +02:00
+++ 1.168/sql/log.cc	2007-03-22 13:14:17 +02:00
@@ -2255,8 +2255,8 @@
   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));
   }

--- 1.191/sql/log_event.cc	2007-03-22 13:14:17 +02:00
+++ 1.192/sql/log_event.cc	2007-03-22 13:14:17 +02:00
@@ -2043,7 +2043,7 @@
 #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,
+  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)
@@ -2673,7 +2673,7 @@
     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

--- 1.108/client/mysqlbinlog.cc	2007-03-22 13:14:17 +02:00
+++ 1.109/client/mysqlbinlog.cc	2007-03-22 13:14:17 +02:00
@@ -834,7 +834,7 @@
     }
     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);

--- 1.628/sql/mysqld.cc	2007-03-22 13:14:17 +02:00
+++ 1.629/sql/mysqld.cc	2007-03-22 13:14:17 +02:00
@@ -1443,7 +1443,7 @@
 
     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 @@
     {
       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 @@
       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 @@
    (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,

--- 1.78/sql/net_serv.cc	2007-03-22 13:14:17 +02:00
+++ 1.79/sql/net_serv.cc	2007-03-22 13:14:17 +02:00
@@ -697,7 +697,7 @@
         {
           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)
 	  /*

--- 1.150/sql/opt_range.cc	2007-03-22 13:14:17 +02:00
+++ 1.151/sql/opt_range.cc	2007-03-22 13:14:17 +02:00
@@ -806,7 +806,7 @@
   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;

--- 1.286/sql/slave.cc	2007-03-22 13:14:17 +02:00
+++ 1.287/sql/slave.cc	2007-03-22 13:14:17 +02:00
@@ -2822,7 +2822,7 @@
      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 @@
   /* 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 @@
       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 @@
   }
   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 @@
     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 @@
     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

--- 1.97/sql/sql_cache.cc	2007-03-22 13:14:17 +02:00
+++ 1.98/sql/sql_cache.cc	2007-03-22 13:14:17 +02:00
@@ -528,7 +528,7 @@
   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))));
+			((ulong) this)-ALIGN_SIZE(sizeof(Query_cache_block))));
   DBUG_VOID_RETURN;
 }
 
@@ -537,7 +537,7 @@
 {
   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))));
+			((ulong)this)-ALIGN_SIZE(sizeof(Query_cache_block))));
   /*
     The following call is not needed on system where one can destroy an
     active semaphore
@@ -1140,7 +1140,7 @@
 #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))));
@@ -1833,7 +1833,7 @@
 {
   DBUG_ENTER("Query_cache::append_result_data");
   DBUG_PRINT("qcache", ("append %lu bytes to 0x%lx query",
-		      data_len, query_block));
+                        data_len, (ulong) query_block));
 
   if (query_block->query()->add(data_len) > query_cache_limit)
   {
@@ -3339,7 +3339,7 @@
       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 +3569,7 @@
     default:
       DBUG_PRINT("error",
 		 ("block 0x%lx have incorrect type %u",
-		  block, block->type));
+		  (ulong) block, block->type));
       result = 1;
     }
     
@@ -3668,7 +3668,7 @@
       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;
       }
     }

--- 1.213/sql/sql_class.cc	2007-03-22 13:14:17 +02:00
+++ 1.214/sql/sql_class.cc	2007-03-22 13:14:17 +02:00
@@ -156,9 +156,8 @@
 
 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,7 @@
     {
       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 +625,7 @@
       {
 	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 +637,7 @@
     }
   }
   *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;
 }

--- 1.143/sql/sql_delete.cc	2007-03-22 13:14:17 +02:00
+++ 1.144/sql/sql_delete.cc	2007-03-22 13:14:17 +02:00
@@ -272,7 +272,7 @@
   else
   {
     send_ok(thd,deleted);
-    DBUG_PRINT("info",("%d records deleted",deleted));
+    DBUG_PRINT("info",("%lu records deleted", (ulong) deleted));
   }
        DBUG_RETURN(0);
 }

--- 1.496/sql/sql_parse.cc	2007-03-22 13:14:17 +02:00
+++ 1.497/sql/sql_parse.cc	2007-03-22 13:14:17 +02:00
@@ -306,9 +306,9 @@
     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 @@
   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 @@
     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_*
 

--- 1.469/sql/sql_select.cc	2007-03-22 13:14:17 +02:00
+++ 1.470/sql/sql_select.cc	2007-03-22 13:14:17 +02:00
@@ -6052,6 +6052,7 @@
   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;
   /*

--- 1.312/sql/sql_table.cc	2007-03-22 13:14:17 +02:00
+++ 1.313/sql/sql_table.cc	2007-03-22 13:14:17 +02:00
@@ -2711,7 +2711,7 @@
 		      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];

--- 1.159/sql/sql_update.cc	2007-03-22 13:14:17 +02:00
+++ 1.160/sql/sql_update.cc	2007-03-22 13:14:17 +02:00
@@ -407,7 +407,7 @@
     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 @@
 
   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;
 }
 

--- 1.142/sql/table.cc	2007-03-22 13:14:17 +02:00
+++ 1.143/sql/table.cc	2007-03-22 13:14:17 +02:00
@@ -87,7 +87,7 @@
   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: %lx", name, (ulong) outparam));
 
   bzero((char*) outparam,sizeof(*outparam));
   outparam->blob_ptr_size=sizeof(char*);

--- 1.52/sql/unireg.cc	2007-03-22 13:14:17 +02:00
+++ 1.53/sql/unireg.cc	2007-03-22 13:14:17 +02:00
@@ -358,14 +358,14 @@
     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);

--- 1.22/mysys/my_handler.c	2007-03-22 13:14:17 +02:00
+++ 1.23/mysys/my_handler.c	2007-03-22 13:14:17 +02:00
@@ -543,8 +543,11 @@
     case HA_KEYTYPE_DOUBLE:
       a= end;
       break;
+    case HA_KEYTYPE_END:                        /* purecov: inspected */
+      /* keep compiler happy */
+      DBUG_ASSERT(0);
+      break;
     }
   }
   return keyseg;
 }
-

--- 1.148/sql/item_subselect.cc	2007-03-22 13:14:17 +02:00
+++ 1.149/sql/item_subselect.cc	2007-03-22 13:14:17 +02:00
@@ -54,7 +54,7 @@
 {
 
   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)

--- 1.31/sql/examples/ha_archive.cc	2007-03-22 13:14:17 +02:00
+++ 1.32/sql/examples/ha_archive.cc	2007-03-22 13:14:17 +02:00
@@ -573,7 +573,8 @@
     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;

--- 1.23/sql/tztime.cc	2007-03-22 13:14:17 +02:00
+++ 1.24/sql/tztime.cc	2007-03-22 13:14:17 +02:00
@@ -948,8 +948,8 @@
   */
   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 */
     }

--- 1.96/sql-common/client.c	2007-03-22 13:14:17 +02:00
+++ 1.97/sql-common/client.c	2007-03-22 13:14:17 +02:00
@@ -601,7 +601,7 @@
 
   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 @@
 mysql_free_result(MYSQL_RES *result)
 {
   DBUG_ENTER("mysql_free_result");
-  DBUG_PRINT("enter",("mysql_res: %lx",result));
+  DBUG_PRINT("enter",("mysql_res: %lx", (ulong) result));
   if (result)
   {
     MYSQL *mysql= result->handle;
@@ -1174,7 +1174,7 @@
     {
       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 @@
     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 @@
     goto error;
 #endif
 
-  DBUG_PRINT("exit",("Mysql handler: %lx",mysql));
+  DBUG_PRINT("exit",("Mysql handler: %lx", (ulong) mysql));
   reset_sigpipe(mysql);
   DBUG_RETURN(mysql);
 
@@ -2533,7 +2533,7 @@
 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: %lx", (ulong) mysql));
   DBUG_PRINT("query",("Query = '%-.4096s'",query));
 
   if (mysql_send_query(mysql,query,length))

--- 1.7/myisam/mi_keycache.c	2007-03-22 13:14:17 +02:00
+++ 1.8/myisam/mi_keycache.c	2007-03-22 13:14:17 +02:00
@@ -55,7 +55,7 @@
   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));
+		      (long) share->key_cache, (long) key_cache));
 
   /*
     Skip operation if we didn't change key cache. This can happen if we
--- New file ---
+++ support-files/compiler_warnings.supp	07/03/22 13:13:36
#
# 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.*


--- 1.19/sql-common/my_time.c	2007-03-22 13:14:17 +02:00
+++ 1.20/sql-common/my_time.c	2007-03-22 13:14:17 +02:00
@@ -902,7 +902,7 @@
   */
   if ((tmp < TIMESTAMP_MIN_VALUE) || (tmp > TIMESTAMP_MAX_VALUE))
     tmp= 0;
-end:
+
   return (my_time_t) tmp;
 } /* my_system_gmt_sec */
 

--- 1.53/ndb/src/mgmclient/CommandInterpreter.cpp	2007-03-22 13:14:17 +02:00
+++ 1.54/ndb/src/mgmclient/CommandInterpreter.cpp	2007-03-22 13:14:17 +02:00
@@ -1263,8 +1263,8 @@
   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;

--- 1.195/sql/ha_ndbcluster.cc	2007-03-22 13:14:17 +02:00
+++ 1.196/sql/ha_ndbcluster.cc	2007-03-22 13:14:17 +02:00
@@ -1484,7 +1484,7 @@
 	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 @@
                 (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;
 
@@ -2787,7 +2787,7 @@
       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));
@@ -3926,7 +3926,8 @@
   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=%x, len=%d", (uint) pack_data,
+                      pack_length));
   tab.setFrm(pack_data, pack_length);      
   my_free((char*)data, MYF(0));
   my_free((char*)pack_data, MYF(0));
@@ -5221,14 +5222,14 @@
   uint blob_len;
   frm_blob_struct* blob;
   DBUG_ENTER("packfrm");
-  DBUG_PRINT("enter", ("data: %x, len: %d", data, len));
+  DBUG_PRINT("enter", ("data: %x, len: %d", (uint) 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,7 @@
   *pack_len= blob_len;
   error= 0;
   
-  DBUG_PRINT("exit", ("pack_data: %x, pack_len: %d", *pack_data, *pack_len));
+  DBUG_PRINT("exit", ("pack_data: %x, pack_len: %d", (uint) *pack_data, *pack_len));
 err:
   DBUG_RETURN(error);
   
@@ -5262,13 +5263,13 @@
    byte *data;
    ulong complen, orglen, ver;
    DBUG_ENTER("unpackfrm");
-   DBUG_PRINT("enter", ("pack_data: %x", pack_data));
+   DBUG_PRINT("enter", ("pack_data: %x", (uint) 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 +5288,7 @@
    *unpack_data= data;
    *unpack_len= complen;
 
-   DBUG_PRINT("exit", ("frmdata: %x, len: %d", *unpack_data, *unpack_len));
+   DBUG_PRINT("exit", ("frmdata: %x, len: %d", (uint) *unpack_data, *unpack_len));
 
    DBUG_RETURN(0);
 }
@@ -5367,7 +5368,8 @@
       * 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:

--- 1.216/sql/ha_innodb.cc	2007-03-22 13:14:17 +02:00
+++ 1.217/sql/ha_innodb.cc	2007-03-22 13:14:17 +02:00
@@ -3594,7 +3594,7 @@
 	}
 
 	if (error) {
-	        DBUG_PRINT("error",("Got error: %ld",error));
+	        DBUG_PRINT("error",("Got error: %d", error));
 		DBUG_RETURN(error);
 	}
 
@@ -3604,7 +3604,7 @@
 	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);
 

--- 1.4/mysys/my_dup.c	2007-03-22 13:14:17 +02:00
+++ 1.5/mysys/my_dup.c	2007-03-22 13:14:17 +02:00
@@ -30,7 +30,7 @@
   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");

--- 1.6/mysys/mf_keycaches.c	2007-03-22 13:14:17 +02:00
+++ 1.7/mysys/mf_keycaches.c	2007-03-22 13:14:17 +02:00
@@ -159,7 +159,7 @@
     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 @@
   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);

--- 1.7/sql/strfunc.cc	2007-03-22 13:14:17 +02:00
+++ 1.8/sql/strfunc.cc	2007-03-22 13:14:17 +02:00
@@ -150,7 +150,7 @@
   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)
   {

--- 1.67/libmysqld/libmysqld.c	2007-03-22 13:14:17 +02:00
+++ 1.68/libmysqld/libmysqld.c	2007-03-22 13:14:17 +02:00
@@ -191,7 +191,7 @@
     }
   }
 
-  DBUG_PRINT("exit",("Mysql handler: %lx",mysql));
+  DBUG_PRINT("exit",("Mysql handler: %lx", (ulong) mysql));
   DBUG_RETURN(mysql);
 
 error:

--- 1.141/sql/sql_repl.cc	2007-03-22 13:14:17 +02:00
+++ 1.142/sql/sql_repl.cc	2007-03-22 13:14:17 +02:00
@@ -1017,7 +1017,7 @@
   {
     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 @@
     }
   }
   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,

--- 1.161/sql/sql_prepare.cc	2007-03-22 13:14:17 +02:00
+++ 1.162/sql/sql_prepare.cc	2007-03-22 13:14:17 +02:00
@@ -1394,7 +1394,7 @@
   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 ||

--- 1.175/tests/mysql_client_test.c	2007-03-22 13:14:17 +02:00
+++ 1.176/tests/mysql_client_test.c	2007-03-22 13:14:17 +02:00
@@ -767,6 +767,7 @@
 
 /* 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 @@
   DIE_UNLESS(affected_rows == exp_count);
   mysql_stmt_close(stmt);
 }
-
+#endif
 
 /* Store result processing */
 
@@ -11716,6 +11717,7 @@
   DIE_UNLESS(res==1);
 }
 
+#ifndef EMBEDDED_LIBRARY
 static void test_bug12744()
 {
   MYSQL_STMT *prep_stmt = NULL;
@@ -11746,6 +11748,7 @@
   }
   rc= mysql_stmt_close(prep_stmt);
 }
+#endif
 
 /*
   Bug#11718: query with function, join and order by returns wrong type
Thread
bk commit into 4.1 tree (jani:1.2623)jani22 Mar