From bb25fb702ed8ecf005ad982faa3441e3c9ef57a7 Mon Sep 17 00:00:00 2001 From: Kelvin Lee Date: Sat, 10 Sep 2016 10:35:07 +1000 Subject: [PATCH] Fixed compiler warning about too many arguments for sprintf. --- source/Debugger/Debugger_Help.cpp | 12 ++++++------ source/Frame.cpp | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/source/Debugger/Debugger_Help.cpp b/source/Debugger/Debugger_Help.cpp index 9aa8ae91..328d20b7 100644 --- a/source/Debugger/Debugger_Help.cpp +++ b/source/Debugger/Debugger_Help.cpp @@ -1260,11 +1260,11 @@ Update_t CmdHelpSpecific (int nArgs) ConsoleBufferPush( " '...' designate Apple High-Bit text" ); Help_Examples(); sprintf( sText, "%s %s F000,1000 'Apple' // search High-Bit", CHC_EXAMPLE, pCommand->m_sName ); ConsolePrint( sText ); - sprintf( sText, "%s MT1 @2" , CHC_EXAMPLE, pCommand->m_sName ); ConsolePrint( sText ); + sprintf( sText, "%s MT1 @2" , CHC_EXAMPLE ); ConsolePrint( sText ); sprintf( sText, "%s %s D000:FFFF \"FLAS\" // search ASCII ", CHC_EXAMPLE, pCommand->m_sName ); ConsolePrint( sText ); - sprintf( sText, "%s MA1 @1" , CHC_EXAMPLE, pCommand->m_sName ); ConsolePrint( sText ); + sprintf( sText, "%s MA1 @1" , CHC_EXAMPLE ); ConsolePrint( sText ); sprintf( sText, "%s %s D000,4000 \"EN\" 'D' // Mixed text" , CHC_EXAMPLE, pCommand->m_sName ); ConsolePrint( sText ); - sprintf( sText, "%s MT1 @1" , CHC_EXAMPLE, pCommand->m_sName ); ConsolePrint( sText ); + sprintf( sText, "%s MT1 @1" , CHC_EXAMPLE ); ConsolePrint( sText ); sprintf( sText, "%s %s D000,4000 'Apple' ? ']'" , CHC_EXAMPLE, pCommand->m_sName ); ConsolePrint( sText ); break; case CMD_MEMORY_SEARCH_HEX: @@ -1279,13 +1279,13 @@ Update_t CmdHelpSpecific (int nArgs) ConsoleBufferPush( " #? match specific high nibble, match any low nibble" ); Help_Examples(); sprintf( sText, "%s %s F000,1000 AD ? C0", CHC_EXAMPLE, pCommand->m_sName ); ConsolePrint( sText ); - sprintf( sText, "%s U @1" , CHC_EXAMPLE, pCommand->m_sName ); ConsolePrint( sText ); + sprintf( sText, "%s U @1" , CHC_EXAMPLE ); ConsolePrint( sText ); sprintf( sText, "%s %s F000,1000 ?1 C0" , CHC_EXAMPLE, pCommand->m_sName ); ConsolePrint( sText ); sprintf( sText, "%s %s F000,1000 5? C0" , CHC_EXAMPLE, pCommand->m_sName ); ConsolePrint( sText ); sprintf( sText, "%s %s F000,1000 10 C?" , CHC_EXAMPLE, pCommand->m_sName ); ConsolePrint( sText ); - sprintf( sText, "%s U @2 - 1" , CHC_EXAMPLE, pCommand->m_sName ); ConsolePrint( sText ); + sprintf( sText, "%s U @2 - 1" , CHC_EXAMPLE ); ConsolePrint( sText ); sprintf( sText, "%s %s F000:FFFF C030" , CHC_EXAMPLE, pCommand->m_sName ); ConsolePrint( sText ); - sprintf( sText, "%s U @1 - 1" , CHC_EXAMPLE, pCommand->m_sName ); ConsolePrint( sText ); + sprintf( sText, "%s U @1 - 1" , CHC_EXAMPLE ); ConsolePrint( sText ); break; // case CMD_MEMORY_SEARCH_APPLE: // wsprintf( sText, TEXT("Deprecated. Use: %s" ), g_aCommands[ CMD_MEMORY_SEARCH ].m_sName ); ConsoleBufferPush( sText ); diff --git a/source/Frame.cpp b/source/Frame.cpp index 612003ea..d62f908d 100644 --- a/source/Frame.cpp +++ b/source/Frame.cpp @@ -750,11 +750,11 @@ void FrameDrawDiskStatus( HDC passdc ) } sprintf_s( g_sTrackDrive1 , sizeof(g_sTrackDrive1 ), "%2d", g_nTrackDrive1 ); - if (g_nSectorDrive1 < 0) sprintf_s( g_sSectorDrive1, sizeof(g_sSectorDrive1), "??" , g_nSectorDrive1 ); + if (g_nSectorDrive1 < 0) sprintf_s( g_sSectorDrive1, sizeof(g_sSectorDrive1), "??" ); else sprintf_s( g_sSectorDrive1, sizeof(g_sSectorDrive1), "%2d", g_nSectorDrive1 ); sprintf_s( g_sTrackDrive2 , sizeof(g_sTrackDrive2), "%2d", g_nTrackDrive2 ); - if (g_nSectorDrive2 < 0) sprintf_s( g_sSectorDrive2, sizeof(g_sSectorDrive2), "??" , g_nSectorDrive2 ); + if (g_nSectorDrive2 < 0) sprintf_s( g_sSectorDrive2, sizeof(g_sSectorDrive2), "??" ); else sprintf_s( g_sSectorDrive2, sizeof(g_sSectorDrive2), "%2d", g_nSectorDrive2 ); // Draw Track/Sector