mirror of https://github.com/odrling/Aegisub
Raised the warning level on MSVC8 to 4, and fixed several warnings caused by that.
Originally committed to SVN as r2045.
This commit is contained in:
parent
c248ca39f2
commit
cee958b2d3
|
@ -35,6 +35,10 @@
|
|||
#include <string.h>
|
||||
#include <setjmp.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable: 4701)
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
// MS names some functions differently
|
||||
#define alloca _alloca
|
||||
|
|
|
@ -32,6 +32,10 @@
|
|||
#ifndef MATROSKA_PARSER_H
|
||||
#define MATROSKA_PARSER_H
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable: 4201)
|
||||
#endif
|
||||
|
||||
/* Random notes:
|
||||
*
|
||||
* The parser does not process frame data in any way and does not read it into
|
||||
|
@ -395,4 +399,8 @@ X const char *cs_GetLastError(CompressedStream *cs);
|
|||
|
||||
#undef X
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(default: 4201)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -653,7 +653,7 @@ void AudioKaraoke::EndSplit(bool commit) {
|
|||
wxLogDebug(_T("AudioKaraoke::EndSplit(commit=%d)"), commit?1:0);
|
||||
splitting = false;
|
||||
bool hasSplit = false;
|
||||
size_t first_sel = ~0;
|
||||
size_t first_sel = ~0U;
|
||||
for (size_t i = 0; i < syllables.size(); i ++) {
|
||||
if (syllables[i].pending_splits.size() > 0) {
|
||||
if (commit) {
|
||||
|
|
|
@ -664,6 +664,7 @@ namespace Automation4 {
|
|||
if (has_config && config_dialog) {
|
||||
int results_produced = config_dialog->LuaReadBack(L);
|
||||
assert(results_produced == 1);
|
||||
(void) results_produced; // avoid warning on release builds
|
||||
// TODO, write back stored options here
|
||||
} else {
|
||||
// no config so put an empty table instead
|
||||
|
|
|
@ -43,6 +43,10 @@
|
|||
#include "options.h"
|
||||
#include "ass_style.h"
|
||||
|
||||
#ifdef __VISUALC__
|
||||
#pragma warning(disable: 4800)
|
||||
#pragma warning(disable: 4706)
|
||||
#endif
|
||||
|
||||
#define COLLECT_PV(buf, s, e) \
|
||||
buf = wxString(SvPV_nolen(ST(s)), pl2wx);\
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
|
||||
#ifdef __VISUALC__
|
||||
#pragma warning(disable: 4800)
|
||||
#pragma warning(disable: 4706)
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -101,7 +101,6 @@ wxString CharSetDetect::GetEncoding(wxString filename) {
|
|||
results.sort();
|
||||
|
||||
// Get choice from user
|
||||
int n = results.size();
|
||||
wxArrayString choices;
|
||||
wxArrayString picked;
|
||||
int i = 0;
|
||||
|
|
|
@ -238,9 +238,9 @@ void DialogDummyVideo::OnLengthChange(wxCommandEvent &evt)
|
|||
void DialogDummyVideo::UpdateLengthDisplay()
|
||||
{
|
||||
double fpsval;
|
||||
int lengthval = 0;
|
||||
int lengthval = length->GetValue();
|
||||
if (!length_display) return;
|
||||
if ((fps->GetValue().ToDouble(&fpsval)) && (lengthval = length->GetValue()) && fpsval > 0 && lengthval > 0) {
|
||||
if ((fps->GetValue().ToDouble(&fpsval)) && fpsval > 0 && lengthval > 0) {
|
||||
int tt = int(lengthval / fpsval * 1000); // frames / (frames/seconds) * 1000 = milliseconds
|
||||
// 32 bit signed int can hold almost 600 positive hours when counting milliseconds, ASS allows at most just below 10 hours, so we're safe
|
||||
int ms, s, m, h;
|
||||
|
|
|
@ -117,7 +117,7 @@ void SetThreadName(DWORD dwThreadID, LPCSTR szThreadName) {
|
|||
// Gets called when application starts, creates MainFrame
|
||||
bool AegisubApp::OnInit() {
|
||||
#ifdef __VISUALC__
|
||||
SetThreadName(-1,"AegiMain");
|
||||
SetThreadName((DWORD) -1,"AegiMain");
|
||||
#endif
|
||||
|
||||
StartupLog(_T("Inside OnInit"));
|
||||
|
|
|
@ -78,7 +78,7 @@ wxArrayInt VFWWrapper::GetKeyFrames(wxString filename) {
|
|||
|
||||
// Loop through stream
|
||||
for (size_t i=0;i<frame_c;i++) {
|
||||
if (AVIStreamIsKeyFrame(ppavi,i)) {
|
||||
if (AVIStreamIsKeyFrame(ppavi,(int)i)) {
|
||||
frames.Add(i);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#ifdef WITH_DIRECTSHOW
|
||||
|
||||
#pragma warning(disable: 4995)
|
||||
#pragma warning(disable: 4238)
|
||||
#include <wx/wxprec.h>
|
||||
#ifdef __WINDOWS__
|
||||
#include <wx/image.h>
|
||||
|
|
|
@ -52,11 +52,11 @@
|
|||
OpenMP="true"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="stdwx.h"
|
||||
WarningLevel="3"
|
||||
WarningLevel="4"
|
||||
WarnAsError="true"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
DisableSpecificWarnings="4267"
|
||||
DisableSpecificWarnings="4267,4100,4428"
|
||||
ForcedIncludeFiles="stdwx.h;config.h"
|
||||
/>
|
||||
<Tool
|
||||
|
@ -223,11 +223,11 @@
|
|||
OpenMP="true"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="stdwx.h"
|
||||
WarningLevel="3"
|
||||
WarningLevel="4"
|
||||
WarnAsError="true"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
DisableSpecificWarnings="4267"
|
||||
DisableSpecificWarnings="4267,4100,4428"
|
||||
ForcedIncludeFiles="stdwx.h;config.h"
|
||||
/>
|
||||
<Tool
|
||||
|
|
Loading…
Reference in New Issue