diff options
author | unknown <lars@mysql.com> | 2005-11-22 02:40:08 +0100 |
---|---|---|
committer | unknown <lars@mysql.com> | 2005-11-22 02:40:08 +0100 |
commit | 0191f2b95d20cd7badb327145c6f6434917168cf (patch) | |
tree | 854ab583f9ebe8dbaf029ae9e399c17fad94b684 /sql/log_event.cc | |
parent | baee965bd6aaec9a14074f7531af957a2901e895 (diff) | |
download | mariadb-git-0191f2b95d20cd7badb327145c6f6434917168cf.tar.gz |
Added explicit casts, since on i686, the fprintf function does not cast my_off_t correctly.
Changed wrong printf to fprintf.
sql/log_event.cc:
Added explicit casts, changed wrong printf to fprintf
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r-- | sql/log_event.cc | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc index 2390ebd4214..1a192ffaf5b 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -901,14 +901,16 @@ void Log_event::print_header(FILE* file, PRINT_EVENT_INFO* print_event_info) /* Pretty-print event common header if header is exactly 19 bytes */ if (print_event_info->common_header_len == LOG_EVENT_MINIMAL_HEADER_LEN) { + DBUG_ASSERT(hexdump_from == (unsigned long) hexdump_from); fprintf(file, "# Position Timestamp Type Master ID " "Size Master Pos Flags \n"); fprintf(file, "# %8.8lx %02x %02x %02x %02x %02x " "%02x %02x %02x %02x %02x %02x %02x %02x " "%02x %02x %02x %02x %02x %02x\n", - hexdump_from, ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], - ptr[5], ptr[6], ptr[7], ptr[8], ptr[9], ptr[10], ptr[11], - ptr[12], ptr[13], ptr[14], ptr[15], ptr[16], ptr[17], ptr[18]); + (unsigned long) hexdump_from, + ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], ptr[6], + ptr[7], ptr[8], ptr[9], ptr[10], ptr[11], ptr[12], ptr[13], + ptr[14], ptr[15], ptr[16], ptr[17], ptr[18]); ptr += LOG_EVENT_MINIMAL_HEADER_LEN; hexdump_from += LOG_EVENT_MINIMAL_HEADER_LEN; } @@ -925,8 +927,10 @@ void Log_event::print_header(FILE* file, PRINT_EVENT_INFO* print_event_info) if (i % 16 == 15) { + DBUG_ASSERT(hexdump_from == (unsigned long) hexdump_from); fprintf(file, "# %8.8lx %-48.48s |%16s|\n", - hexdump_from + (i & 0xfffffff0), hex_string, char_string); + (unsigned long) (hexdump_from + (i & 0xfffffff0)), + hex_string, char_string); hex_string[0]= 0; char_string[0]= 0; c= char_string; @@ -938,8 +942,10 @@ void Log_event::print_header(FILE* file, PRINT_EVENT_INFO* print_event_info) /* Non-full last line */ if (hex_string[0]) { - printf("# %8.8lx %-48.48s |%s|\n# ", - hexdump_from + (i & 0xfffffff0), hex_string, char_string); + DBUG_ASSERT(hexdump_from == (unsigned long) hexdump_from); + fprintf(file, "# %8.8lx %-48.48s |%s|\n# ", + (unsigned long) (hexdump_from + (i & 0xfffffff0)), + hex_string, char_string); } } } |