From d247e6df50e9377cc5ecd0f4c29cc40de4165d1a Mon Sep 17 00:00:00 2001 From: "FWoltermann@gmail.com" Date: Mon, 16 Jul 2012 17:51:12 +0000 Subject: Ignore PVS Studio warning V576 --- nGenEx/ActiveWindow.cpp | 2 +- nGenEx/Archive.cpp | 4 ++-- nGenEx/Button.cpp | 4 ++-- nGenEx/ComboBox.cpp | 4 ++-- nGenEx/FormWindow.cpp | 2 +- nGenEx/Game.cpp | 4 ++-- nGenEx/ImageBox.cpp | 4 ++-- nGenEx/MachineInfo.cpp | 22 +++++++++++----------- nGenEx/Slider.cpp | 4 ++-- nGenEx/SoundD3D.cpp | 2 +- nGenEx/VideoDX9Enum.cpp | 2 +- 11 files changed, 27 insertions(+), 27 deletions(-) (limited to 'nGenEx') diff --git a/nGenEx/ActiveWindow.cpp b/nGenEx/ActiveWindow.cpp index 756912b..cf76063 100644 --- a/nGenEx/ActiveWindow.cpp +++ b/nGenEx/ActiveWindow.cpp @@ -62,7 +62,7 @@ fixed_width(0), fixed_height(0), hide_partial(true) Show(); char buf[32]; - sprintf_s(buf, "ActiveWindow %d", id); + sprintf_s(buf, "ActiveWindow %d", id); //-V576 desc = buf; } diff --git a/nGenEx/Archive.cpp b/nGenEx/Archive.cpp index 689ac10..1a71ed3 100644 --- a/nGenEx/Archive.cpp +++ b/nGenEx/Archive.cpp @@ -563,7 +563,7 @@ void DataArchive::List() int total_comp = 0; printf("DATAFILE: %s\n", datafile); - printf("Files: %d\n", header.nfiles); + printf("Files: %d\n", header.nfiles); //-V576 printf("\n"); if (directory && header.nfiles) { @@ -574,7 +574,7 @@ void DataArchive::List() DataEntry& e = directory[i]; int ratio = (int) (100.0 * (double) e.size_comp / (double) e.size_orig); - printf("%5d %9d %9d %2d%% %s\n", i+1, e.size_orig, e.size_comp, ratio, e.name); + printf("%5d %9d %9d %2d%% %s\n", i+1, e.size_orig, e.size_comp, ratio, e.name); //-V576 total_orig += e.size_orig; total_comp += e.size_comp; diff --git a/nGenEx/Button.cpp b/nGenEx/Button.cpp index f5318d5..c9cfcab 100644 --- a/nGenEx/Button.cpp +++ b/nGenEx/Button.cpp @@ -64,7 +64,7 @@ Button::Button(Screen* s, int ax, int ay, int aw, int ah, DWORD aid) transition_image = 0; char buf[32]; - sprintf_s(buf, "Button %d", id); + sprintf_s(buf, "Button %d", id); //-V576 desc = buf; } @@ -87,7 +87,7 @@ Button::Button(ActiveWindow* p, int ax, int ay, int aw, int ah, DWORD aid) transition_image = 0; char buf[32]; - sprintf_s(buf, "Button %d", id); + sprintf_s(buf, "Button %d", id); //-V576 desc = buf; } diff --git a/nGenEx/ComboBox.cpp b/nGenEx/ComboBox.cpp index 3c3934f..f3a9987 100644 --- a/nGenEx/ComboBox.cpp +++ b/nGenEx/ComboBox.cpp @@ -43,7 +43,7 @@ ComboBox::ComboBox(ActiveWindow* p, int ax, int ay, int aw, int ah, DWORD aid) bevel_width = 5; char buf[32]; - sprintf_s(buf, "ComboBox %d", id); + sprintf_s(buf, "ComboBox %d", id); //-V576 desc = buf; } @@ -61,7 +61,7 @@ ComboBox::ComboBox(Screen* s, int ax, int ay, int aw, int ah, DWORD aid) bevel_width = 5; char buf[32]; - sprintf_s(buf, "ComboBox %d", id); + sprintf_s(buf, "ComboBox %d", id); //-V576 desc = buf; } diff --git a/nGenEx/FormWindow.cpp b/nGenEx/FormWindow.cpp index 654734f..58f7f84 100644 --- a/nGenEx/FormWindow.cpp +++ b/nGenEx/FormWindow.cpp @@ -34,7 +34,7 @@ DWORD aid, DWORD s, ActiveWindow* pParent) : ActiveWindow(screen, ax, ay, aw, ah, aid, s, pParent) { char buf[32]; - sprintf_s(buf, "Form %d", id); + sprintf_s(buf, "Form %d", id); //-V576 desc = buf; } diff --git a/nGenEx/Game.cpp b/nGenEx/Game.cpp index 162b815..50d1b28 100644 --- a/nGenEx/Game.cpp +++ b/nGenEx/Game.cpp @@ -1130,7 +1130,7 @@ Game::ScreenCapture(const char* name) if (name) strcpy_s(filename, name); else - sprintf_s(filename, "A%d.PCX", shot_num++); + sprintf_s(filename, "A%d.PCX", shot_num++); //-V576 Bitmap bmp; @@ -1179,7 +1179,7 @@ Game::AVICapture(const char* name) if (name) strcpy_s(filename, name); else - sprintf_s(filename, "A%d.avi", avi_num); + sprintf_s(filename, "A%d.avi", avi_num); //-V576 if (video && video->Capture(bmp)) { //bmp.ScaleTo(bmp.Width()/2, bmp.Height()/2); diff --git a/nGenEx/ImageBox.cpp b/nGenEx/ImageBox.cpp index cf3ba39..bfef55c 100644 --- a/nGenEx/ImageBox.cpp +++ b/nGenEx/ImageBox.cpp @@ -28,7 +28,7 @@ ImageBox::ImageBox(ActiveWindow* p, int ax, int ay, int aw, int ah, DWORD aid) text_align = DT_CENTER; char buf[32]; - sprintf_s(buf, "ImageBox %d", id); + sprintf_s(buf, "ImageBox %d", id); //-V576 desc = buf; } @@ -39,7 +39,7 @@ ImageBox::ImageBox(Screen* s, int ax, int ay, int aw, int ah, DWORD aid) text_align = DT_CENTER; char buf[32]; - sprintf_s(buf, "ImageBox %d", id); + sprintf_s(buf, "ImageBox %d", id); //-V576 desc = buf; } diff --git a/nGenEx/MachineInfo.cpp b/nGenEx/MachineInfo.cpp index 5548bc9..c2951a1 100644 --- a/nGenEx/MachineInfo.cpp +++ b/nGenEx/MachineInfo.cpp @@ -237,7 +237,7 @@ MachineInfo::GetPlatform() case VER_PLATFORM_WIN32s: case VER_PLATFORM_WIN32_WINDOWS: { char msg[256]; - sprintf_s(msg, "Invalid Operating System Platform: %d\n", os_ver.dwPlatformId); + sprintf_s(msg, "Invalid Operating System Platform: %d\n", os_ver.dwPlatformId); //-V576 Print(msg); } break; @@ -298,7 +298,7 @@ MachineInfo::DescribeMachine() switch (platform) { case OS_WIN95: - sprintf_s(txt, "Windows 95 version %d.%d.%d %s", + sprintf_s(txt, "Windows 95 version %d.%d.%d %s", //-V576 os_ver.dwMajorVersion, os_ver.dwMinorVersion, LOWORD(os_ver.dwBuildNumber), @@ -306,7 +306,7 @@ MachineInfo::DescribeMachine() break; case OS_WIN98: - sprintf_s(txt, "Windows 98 version %d.%d.%d %s", + sprintf_s(txt, "Windows 98 version %d.%d.%d %s", //-V576 os_ver.dwMajorVersion, os_ver.dwMinorVersion, LOWORD(os_ver.dwBuildNumber), @@ -314,7 +314,7 @@ MachineInfo::DescribeMachine() break; case OS_WINNT: - sprintf_s(txt, "Windows NT %d.%d (Build %d) %s", + sprintf_s(txt, "Windows NT %d.%d (Build %d) %s", //-V576 os_ver.dwMajorVersion, os_ver.dwMinorVersion, os_ver.dwBuildNumber, @@ -322,42 +322,42 @@ MachineInfo::DescribeMachine() break; case OS_WIN2K: - sprintf_s(txt, "Windows 2000 %d.%d (Build %d) %s", + sprintf_s(txt, "Windows 2000 %d.%d (Build %d) %s", //-V576 os_ver.dwMajorVersion, os_ver.dwMinorVersion, os_ver.dwBuildNumber, os_ver.szCSDVersion); case OS_WINXP: - sprintf_s(txt, "Windows XP %d.%d (Build %d) %s", + sprintf_s(txt, "Windows XP %d.%d (Build %d) %s", //-V576 os_ver.dwMajorVersion, os_ver.dwMinorVersion, os_ver.dwBuildNumber, os_ver.szCSDVersion); break; case OS_WINXP64: - sprintf_s(txt, "Windows XP x64 %d.%d (Build %d) %s", + sprintf_s(txt, "Windows XP x64 %d.%d (Build %d) %s", //-V576 os_ver.dwMajorVersion, os_ver.dwMinorVersion, os_ver.dwBuildNumber, os_ver.szCSDVersion); break; case OS_WINVISTA: - sprintf_s(txt, "Windows Vista %d.%d (Build %d) %s", + sprintf_s(txt, "Windows Vista %d.%d (Build %d) %s", //-V576 os_ver.dwMajorVersion, os_ver.dwMinorVersion, os_ver.dwBuildNumber, os_ver.szCSDVersion); break; case OS_WINSEVEN: - sprintf_s(txt, "Windows 7 %d.%d (Build %d) %s", + sprintf_s(txt, "Windows 7 %d.%d (Build %d) %s", //-V576 os_ver.dwMajorVersion, os_ver.dwMinorVersion, os_ver.dwBuildNumber, os_ver.szCSDVersion); break; case OS_WINFUTURE: - sprintf_s(txt, "Windows from the future %d.%d (Build %d) %s", + sprintf_s(txt, "Windows from the future %d.%d (Build %d) %s", //-V576 os_ver.dwMajorVersion, os_ver.dwMinorVersion, os_ver.dwBuildNumber, @@ -377,7 +377,7 @@ MachineInfo::DescribeMachine() else DescribeOwnerNT(); - sprintf_s(txt, "CPUs Detected: %d CPU Level: %d.%d.%d CPU Speed: %d", + sprintf_s(txt, "CPUs Detected: %d CPU Level: %d.%d.%d CPU Speed: %d", //-V576 cpu_info.dwNumberOfProcessors, cpu_info.wProcessorLevel, cpu_info.wProcessorRevision >> 8, diff --git a/nGenEx/Slider.cpp b/nGenEx/Slider.cpp index f011d35..4efa120 100644 --- a/nGenEx/Slider.cpp +++ b/nGenEx/Slider.cpp @@ -46,7 +46,7 @@ Slider::Slider(ActiveWindow* p, int ax, int ay, int aw, int ah, DWORD aid) marker[1] = -1; char buf[32]; - sprintf_s(buf, "Slider %d", id); + sprintf_s(buf, "Slider %d", id); //-V576 desc = buf; } @@ -77,7 +77,7 @@ Slider::Slider(Screen* s, int ax, int ay, int aw, int ah, DWORD aid) marker[1] = -1; char buf[32]; - sprintf_s(buf, "Slider %d", id); + sprintf_s(buf, "Slider %d", id); //-V576 desc = buf; } diff --git a/nGenEx/SoundD3D.cpp b/nGenEx/SoundD3D.cpp index 1e8b5d0..ca40f97 100644 --- a/nGenEx/SoundD3D.cpp +++ b/nGenEx/SoundD3D.cpp @@ -769,7 +769,7 @@ SoundD3D::Localize() hr = buffer->SetFrequency(f_shift); if (!SUCCEEDED(hr)) { char warn[512]; - sprintf_s(warn, "Warning: could not set Doppler frequency on buffer to %d", f_shift); + sprintf_s(warn, "Warning: could not set Doppler frequency on buffer to %d", f_shift); //-V576 SoundD3DError(warn, hr); } } diff --git a/nGenEx/VideoDX9Enum.cpp b/nGenEx/VideoDX9Enum.cpp index 68f5264..a8b4cf7 100644 --- a/nGenEx/VideoDX9Enum.cpp +++ b/nGenEx/VideoDX9Enum.cpp @@ -938,7 +938,7 @@ VideoDX9DisplayMode::GetDescription() const { static char desc[32]; - sprintf_s(desc, "%4d x %4d %-12s %d Hz", + sprintf_s(desc, "%4d x %4d %-12s %d Hz", //-V576 width, height, D3DFormatToString(format), -- cgit v1.1