From 03b1d6b74d13dd51a53d2531becb4137b96fa1ed Mon Sep 17 00:00:00 2001 From: "FWoltermann@gmail.com" Date: Sun, 27 May 2012 09:39:31 +0000 Subject: A few things MSVC's analyzer found. --- nGenEx/Archive.cpp | 1 + nGenEx/AviFile.cpp | 1 + nGenEx/Bitmap.cpp | 1 + nGenEx/Sound.cpp | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) (limited to 'nGenEx') diff --git a/nGenEx/Archive.cpp b/nGenEx/Archive.cpp index cd93640..689ac10 100644 --- a/nGenEx/Archive.cpp +++ b/nGenEx/Archive.cpp @@ -223,6 +223,7 @@ void DataArchive::LoadDatafile(const char* name) fread(dirbuf, header.dir_size_comp, 1, f); int err = uncompress((BYTE*) directory, &len, +#pragma warning(suppress: 6029) dirbuf, header.dir_size_comp); if (err != Z_OK) ZeroMemory(directory, sizeof(DataEntry) * dirsize); diff --git a/nGenEx/AviFile.cpp b/nGenEx/AviFile.cpp index b9c092b..931765d 100644 --- a/nGenEx/AviFile.cpp +++ b/nGenEx/AviFile.cpp @@ -151,6 +151,7 @@ AviFile::AddFrame(const Bitmap& bmp) } } +#pragma warning(suppress: 6001) hr = AVIStreamWrite(ps_comp, nframe, 1, buffer, frame_size, AVIIF_KEYFRAME, 0, 0); if (SUCCEEDED(hr)) { diff --git a/nGenEx/Bitmap.cpp b/nGenEx/Bitmap.cpp index d192d7c..819a083 100644 --- a/nGenEx/Bitmap.cpp +++ b/nGenEx/Bitmap.cpp @@ -231,6 +231,7 @@ Bitmap::BitBlt(int x, int y, const Bitmap& srcBmp, int sx, int sy, int w, int h, Color* src = srcBmp.HiPixels() + (sy*spitch) + sx; for (int i = 0; i < h; i++) { +#pragma warning(suppress: 28183) memcpy(dst, src, rowlen); dst += dpitch; src += spitch; diff --git a/nGenEx/Sound.cpp b/nGenEx/Sound.cpp index 49fdb65..8de0350 100644 --- a/nGenEx/Sound.cpp +++ b/nGenEx/Sound.cpp @@ -113,7 +113,7 @@ Sound::CreateStream(const char* filename) break; default: - delete buf; + delete[] buf; return sound; } } -- cgit v1.1