From 597b92bb7fda703cf4e0cdf6b45279b390a03bcf Mon Sep 17 00:00:00 2001 From: cantabile Date: Tue, 15 May 2012 14:06:49 +0000 Subject: [PATCH] Silence three gcc warnings ("ambiguous else") Originally committed to SVN as r6799. --- aegisub/src/ass_file.cpp | 3 ++- aegisub/src/auto4_base.cpp | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/aegisub/src/ass_file.cpp b/aegisub/src/ass_file.cpp index dabe3863a..37d3f9340 100644 --- a/aegisub/src/ass_file.cpp +++ b/aegisub/src/ass_file.cpp @@ -337,8 +337,9 @@ void AssFile::AddLine(wxString data, int *version, AssAttachment **attach) { else throw "Unknown SSA file format version"; if (trueVersion != *version) { - if (!(trueVersion == 2 && *version == 1)) + if (!(trueVersion == 2 && *version == 1)) { wxLogMessage("Warning: File has the wrong extension."); + } *version = trueVersion; } } diff --git a/aegisub/src/auto4_base.cpp b/aegisub/src/auto4_base.cpp index 91633ee73..bd45f4a15 100644 --- a/aegisub/src/auto4_base.cpp +++ b/aegisub/src/auto4_base.cpp @@ -558,14 +558,16 @@ namespace Automation4 { for (std::vector::iterator i = Factories().begin(); i != Factories().end(); ++i) { Script *s = (*i)->Produce(filename); if (s) { - if (!s->GetLoadedState() && log_errors) + if (!s->GetLoadedState() && log_errors) { wxLogError(_("An Automation script failed to load. File name: '%s', error reported: %s"), filename, s->GetDescription()); + } return s; } } - if (log_errors) + if (log_errors) { wxLogError(_("The file was not recognised as an Automation script: %s"), filename); + } return new UnknownScript(filename);