summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Datafile/Archive.cpp8
-rw-r--r--FoundationEx/MemDebug.cpp2
-rw-r--r--Stars45/Mfd.cpp2
-rw-r--r--Stars45/NetClientDlg.cpp2
-rw-r--r--nGenEx/ActiveWindow.cpp2
-rw-r--r--nGenEx/Archive.cpp4
-rw-r--r--nGenEx/Button.cpp4
-rw-r--r--nGenEx/ComboBox.cpp4
-rw-r--r--nGenEx/FormWindow.cpp2
-rw-r--r--nGenEx/Game.cpp4
-rw-r--r--nGenEx/ImageBox.cpp4
-rw-r--r--nGenEx/MachineInfo.cpp22
-rw-r--r--nGenEx/Slider.cpp4
-rw-r--r--nGenEx/SoundD3D.cpp2
-rw-r--r--nGenEx/VideoDX9Enum.cpp2
15 files changed, 34 insertions, 34 deletions
diff --git a/Datafile/Archive.cpp b/Datafile/Archive.cpp
index cff704c..d99558f 100644
--- a/Datafile/Archive.cpp
+++ b/Datafile/Archive.cpp
@@ -174,7 +174,7 @@ void DataArchive::LoadDatafile(const char* name)
fread(&header, sizeof(DataHeader), 1, f);
if (header.version != VERSION) {
- printf("ERROR: datafile '%s' invalid version '%d'\n",
+ printf("ERROR: datafile '%s' invalid version '%d'\n", //-V576
datafile, header.version);
fclose(f);
exit(-2);
@@ -376,7 +376,7 @@ void DataArchive::Insert(const char* name)
if (verbose) {
int ratio = (int) (100.0 * (double) e.size_comp / (double) e.size_orig);
- printf("%9d => %9d (%2d%%)\n", e.size_orig, e.size_comp, ratio);
+ printf("%9d => %9d (%2d%%)\n", e.size_orig, e.size_comp, ratio); //-V576
}
}
else if (added)
@@ -456,7 +456,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");
printf("Index Orig Size Comp Size Ratio Name\n");
printf("----- --------- --------- ----- ----------------\n");
@@ -465,7 +465,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/FoundationEx/MemDebug.cpp b/FoundationEx/MemDebug.cpp
index 5030653..7ed2958 100644
--- a/FoundationEx/MemDebug.cpp
+++ b/FoundationEx/MemDebug.cpp
@@ -59,7 +59,7 @@ static void heapdump()
avail += hinfo._size;
}
- sprintf_s(report, "------\nUsed Blocks: %d\nAvail Blocks: %d\nTotal Blocks: %d\n", used, avail, used+avail);
+ sprintf_s(report, "------\nUsed Blocks: %d\nAvail Blocks: %d\nTotal Blocks: %d\n", used, avail, used+avail); //-V576
_RPT0(_CRT_WARN, report);
switch (heapstatus) {
diff --git a/Stars45/Mfd.cpp b/Stars45/Mfd.cpp
index 3ba38ae..baa31c2 100644
--- a/Stars45/Mfd.cpp
+++ b/Stars45/Mfd.cpp
@@ -1118,7 +1118,7 @@ MFD::DrawGameMFD()
}
if (Game::TimeCompression() > 1)
- sprintf_s(txt, "%02d:%02d:%02d x%d", hours, minutes, seconds, Game::TimeCompression());
+ sprintf_s(txt, "%02d:%02d:%02d x%d", hours, minutes, seconds, Game::TimeCompression()); //-V576
else
sprintf_s(txt, "%02d:%02d:%02d", hours, minutes, seconds);
diff --git a/Stars45/NetClientDlg.cpp b/Stars45/NetClientDlg.cpp
index 7334a75..a967977 100644
--- a/Stars45/NetClientDlg.cpp
+++ b/Stars45/NetClientDlg.cpp
@@ -204,7 +204,7 @@ NetClientDlg::UpdateServers()
if (info->ping_time > 0 && info->ping_time < 10000) {
char buffer[32];
- sprintf_s(buffer, "%d ms", info->ping_time);
+ sprintf_s(buffer, "%d ms", info->ping_time); //-V576
lst_servers->SetItemText(i, 5, buffer);
switch (info->status) {
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),