8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 04:03:03 +01:00

Fixed use of size_t variables in printf() - thanks to Claudio

This commit is contained in:
alexpeshkoff 2009-07-30 12:16:36 +00:00
parent 2ac3841a7d
commit 3bdb9d5f06
2 changed files with 11 additions and 1 deletions

View File

@ -1123,7 +1123,8 @@ void MemoryPool::print_contents(FILE* file, bool used_only, const char* filter_p
if (blk->mbk_flags & MBK_LAST) if (blk->mbk_flags & MBK_LAST)
break; break;
} }
fprintf(file, "Blocks %d min %d max %d size %d \n\n", cnt, min, max, sum); fprintf(file, "Blocks %"SIZEFORMAT" min %"SIZEFORMAT" max %"SIZEFORMAT" size %"SIZEFORMAT" \n\n",
cnt, min, max, sum);
} }
if (prn_extents == &extents_os) if (prn_extents == &extents_os)

View File

@ -770,6 +770,15 @@ void routine(const char* message, ...) \
#define UQUADFORMAT QUADFORMAT"u" #define UQUADFORMAT QUADFORMAT"u"
#define SQUADFORMAT QUADFORMAT"d" #define SQUADFORMAT QUADFORMAT"d"
// Let use size_t in printf() correctly
#ifndef SIZEFORMAT
#if (SIZEOF_LONG == 8)
#define SIZEFORMAT UQUADFORMAT
#else
#define SIZEFORMAT "u"
#endif
#endif // SIZEFORMAT
#ifdef DEV_BUILD #ifdef DEV_BUILD
/* Define any debugging symbols and macros here. This /* Define any debugging symbols and macros here. This