From 927e886d8103fe9e8d67234d76129419dad3fa1a Mon Sep 17 00:00:00 2001 From: brodsom Date: Thu, 3 Apr 2003 01:51:03 +0000 Subject: [PATCH] Correct formats --- src/dsql/dsql.cpp | 4 ++-- src/dsql/hsh.cpp | 4 ++-- src/ipserver/ipserver.cpp | 4 ++-- src/remote/cntl.cpp | 2 +- src/remote/window.cpp | 2 +- src/utilities/ppg.cpp | 24 ++++++++++++------------ 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/dsql/dsql.cpp b/src/dsql/dsql.cpp index 4a1aef3e3e..3f9f9aa8e7 100644 --- a/src/dsql/dsql.cpp +++ b/src/dsql/dsql.cpp @@ -2360,7 +2360,7 @@ void DSQL_pretty(DSQL_NOD node, int column) if (node->nod_desc.dsc_dtype == dtype_text) sprintf(s, "constant \"%s\"", node->nod_desc.dsc_address); else - sprintf(s, "constant %d", + sprintf(s, "constant %ld", *(SLONG *) (node->nod_desc.dsc_address)); verb = s; } @@ -2481,7 +2481,7 @@ void DSQL_pretty(DSQL_NOD node, int column) } if (node->nod_desc.dsc_dtype) { - PRINTF("%s%s (%d,%d,%x)\n", + PRINTF("%s%s (%d,%d,%p)\n", buffer, verb, node->nod_desc.dsc_dtype, node->nod_desc.dsc_length, node->nod_desc.dsc_address); diff --git a/src/dsql/hsh.cpp b/src/dsql/hsh.cpp index 887d8b6048..6d8ebd3a28 100644 --- a/src/dsql/hsh.cpp +++ b/src/dsql/hsh.cpp @@ -119,12 +119,12 @@ void HSHD_debug(void) collision = collision->sym_collision) { /* check any homonyms first */ - ib_fprintf(ib_stderr, "Symbol type %d: %s %x\n", + ib_fprintf(ib_stderr, "Symbol type %d: %s %p\n", collision->sym_type, collision->sym_string, collision->sym_dbb); for (homptr = collision->sym_homonym; homptr; homptr = homptr->sym_homonym) { - ib_fprintf(ib_stderr, "Homonym Symbol type %d: %s %x\n", + ib_fprintf(ib_stderr, "Homonym Symbol type %d: %s %p\n", homptr->sym_type, homptr->sym_string, homptr->sym_dbb); } diff --git a/src/ipserver/ipserver.cpp b/src/ipserver/ipserver.cpp index bdae4b5494..360bc23b0c 100644 --- a/src/ipserver/ipserver.cpp +++ b/src/ipserver/ipserver.cpp @@ -491,7 +491,7 @@ ULONG IPS_start_thread(ULONG client_pid) CHAR szBuf[80]; DWORD dw = GetLastError(); - sprintf(szBuf, "%s:%s failed: GetLastError returned %u\n", + sprintf(szBuf, "%s:%s failed: GetLastError returned %lu\n", "ipserver.c", "DuplicateHandle(server_proc)", dw); gds__log(szBuf); } @@ -503,7 +503,7 @@ ULONG IPS_start_thread(ULONG client_pid) CHAR szBuf[80]; DWORD dw = GetLastError(); - sprintf(szBuf, "%s:%s failed: GetLastError returned %u\n", + sprintf(szBuf, "%s:%s failed: GetLastError returned %lu\n", "ipserver.c", "DuplicateHandle(ips_server_proc)", dw); gds__log(szBuf); comm->ips_server_proc = 0; diff --git a/src/remote/cntl.cpp b/src/remote/cntl.cpp index 65ece2eadb..a96a695057 100644 --- a/src/remote/cntl.cpp +++ b/src/remote/cntl.cpp @@ -252,7 +252,7 @@ void CNTL_shutdown_service( TEXT * message) char *strings[2]; HANDLE event_source; - sprintf(buffer, "%s error: %d", "Firebird Server", GetLastError()); + sprintf(buffer, "%s error: %lu", "Firebird Server", GetLastError()); event_source = RegisterEventSource(NULL, "Firebird Server"); if (event_source) { diff --git a/src/remote/window.cpp b/src/remote/window.cpp index 2b8d6847b4..bab61b53c8 100644 --- a/src/remote/window.cpp +++ b/src/remote/window.cpp @@ -653,7 +653,7 @@ BOOL CanEndServer(HWND hWnd, BOOL bSysExit) JRD_num_attachments(NULL, 0, 0, &usNumAtt, &usNumDbs); - sprintf(szMsgString, "%lu ", usNumAtt); + sprintf(szMsgString, "%u ", usNumAtt); if (!usNumAtt) /* IF 0 CONNECTIONS, JUST SHUTDOWN */ return TRUE; diff --git a/src/utilities/ppg.cpp b/src/utilities/ppg.cpp index e80491503c..b64ba6d634 100644 --- a/src/utilities/ppg.cpp +++ b/src/utilities/ppg.cpp @@ -338,10 +338,10 @@ void PPG_print_log( LIP logp, SLONG page, memcpy(temp, p + 2, logp->log_cp_1.cp_fn_length); temp[logp->log_cp_1.cp_fn_length] = '\0'; FPRINTF(outfile, "\t\tFile name:\t%s\n", temp); - FPRINTF(outfile, "\t\tPartition offset: %ld ", + FPRINTF(outfile, "\t\tPartition offset: %"SLONGFORMAT" ", logp->log_cp_1.cp_p_offset); - FPRINTF(outfile, "\tSeqno: %ld ", logp->log_cp_1.cp_seqno); - FPRINTF(outfile, "\tOffset: %ld ", logp->log_cp_1.cp_offset); + FPRINTF(outfile, "\tSeqno: %"SLONGFORMAT" ", logp->log_cp_1.cp_seqno); + FPRINTF(outfile, "\tOffset: %"SLONGFORMAT" ", logp->log_cp_1.cp_offset); FPRINTF(outfile, "\n"); break; @@ -351,10 +351,10 @@ void PPG_print_log( LIP logp, SLONG page, memcpy(temp, p + 2, logp->log_cp_2.cp_fn_length); temp[logp->log_cp_2.cp_fn_length] = '\0'; FPRINTF(outfile, "\t\tFile name:\t%s\n", temp); - FPRINTF(outfile, "\t\tPartition offset: %ld ", + FPRINTF(outfile, "\t\tPartition offset: %"SLONGFORMAT" ", logp->log_cp_2.cp_p_offset); - FPRINTF(outfile, "\tSeqno: %ld ", logp->log_cp_2.cp_seqno); - FPRINTF(outfile, "\tOffset: %ld ", logp->log_cp_2.cp_offset); + FPRINTF(outfile, "\tSeqno: %"SLONGFORMAT" ", logp->log_cp_2.cp_seqno); + FPRINTF(outfile, "\tOffset: %"SLONGFORMAT" ", logp->log_cp_2.cp_offset); FPRINTF(outfile, "\n"); break; @@ -364,17 +364,17 @@ void PPG_print_log( LIP logp, SLONG page, memcpy(temp, p + 2, logp->log_file.cp_fn_length); temp[logp->log_file.cp_fn_length] = '\0'; FPRINTF(outfile, "\t\tFile name:\t\t%s\n", temp); - FPRINTF(outfile, "\t\tPartition offset: %ld ", + FPRINTF(outfile, "\t\tPartition offset: %"SLONGFORMAT" ", logp->log_file.cp_p_offset); - FPRINTF(outfile, "\tSeqno: %ld ", logp->log_file.cp_seqno); - FPRINTF(outfile, "\tOffset: %ld ", logp->log_file.cp_offset); + FPRINTF(outfile, "\tSeqno: %"SLONGFORMAT" ", logp->log_file.cp_seqno); + FPRINTF(outfile, "\tOffset: %"SLONGFORMAT" ", logp->log_file.cp_offset); FPRINTF(outfile, "\n"); break; case LOG_chkpt_len: memcpy(<emp, p + 2, p[1]); - FPRINTF(outfile, "\tCheck Point Length %ld\n", ltemp); + FPRINTF(outfile, "\tCheck Point Length %"SLONGFORMAT"\n", ltemp); break; case LOG_num_bufs: @@ -384,12 +384,12 @@ void PPG_print_log( LIP logp, SLONG page, case LOG_bufsize: memcpy(&ustemp, p + 2, p[1]); - FPRINTF(outfile, "\tWAL buffer Size %ld\n", ustemp); + FPRINTF(outfile, "\tWAL buffer Size %u\n", ustemp); break; case LOG_grp_cmt_wait: memcpy(<emp, p + 2, p[1]); - FPRINTF(outfile, "\tGroup Commit Wait Time %ld\n", ltemp); + FPRINTF(outfile, "\tGroup Commit Wait Time %"SLONGFORMAT"\n", ltemp); break; default: