Bug #23748 Various warnings about wrong integer argument sizes in DBUG_PRINT statements
Submitted: 29 Oct 2006 11:11 Modified: 28 Feb 2007 23:53
Reporter: Hartmut Holzgraefe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.1 OS:
Assigned to: CPU Architecture:Any

[29 Oct 2006 11:11] Hartmut Holzgraefe
Description:
there are lots of warnings about wrong integer sizes for given format placeholders like

  event_queue.cc:815: warning: format '%d' expects type 'int', but argument 4 has type 'long int'

How to repeat:
do a BUILD/compile-pentium-debug-max and check the generated warnings

Suggested fix:
change the format specifiers to match the actual data types,
for configuration dependant types like time_t or ha_rows cast up to the largest expected type and change the format specifiers accordingly
[30 Oct 2006 10:24] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/14542

ChangeSet@1.2338, 2006-10-30 11:23:39+01:00, hartmut@mysql.com +40 -0
  fix warnings about format placeholder vs integer size missmatches (Bug #23748)
[30 Oct 2006 16:18] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/14570

ChangeSet@1.2340, 2006-10-30 17:18:21+01:00, hartmut@mysql.com +1 -0
  fix warning introduced by previous commit (Bug #23748)
[30 Oct 2006 17:36] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/14577

ChangeSet@1.2341, 2006-10-30 18:35:51+01:00, hartmut@mysql.com +3 -0
  time_t related format string fixes by casting to long (Bug #23748)
[28 Feb 2007 23:53] Timothy Smith
This has been handled by various commits by Monty and others, removing lots of warnings.