Reduce Visual C++ compiler warnings

* Disable warnings about unimplemented exception specifications -
   these are implemented by G++ but not VC++.
 * Remove unused variable.
This commit is contained in:
Robert Knight 2011-09-16 15:31:39 +01:00
parent 61c717e6d6
commit 773edb5d53
3 changed files with 7 additions and 1 deletions

View file

@ -3,8 +3,10 @@
#include <exception> #include <exception>
#include <string> #include <string>
#include "Platform.h"
#include "StringUtils.h" #include "StringUtils.h"
/** A set of functions for performing common operations /** A set of functions for performing common operations
* on files, throwing exceptions if an operation fails. * on files, throwing exceptions if an operation fails.
* *

View file

@ -8,6 +8,10 @@
#ifdef WIN32 #ifdef WIN32
#define PLATFORM_WINDOWS #define PLATFORM_WINDOWS
#include <windows.h> #include <windows.h>
// disable warnings about exception specifications,
// which are not implemented in Visual C++
#pragma warning(disable:4290)
#endif #endif
#ifdef __APPLE__ #ifdef __APPLE__

View file

@ -115,7 +115,7 @@ void UpdateInstaller::run() throw ()
{ {
updaterPath = ProcessUtils::currentProcessPath(); updaterPath = ProcessUtils::currentProcessPath();
} }
catch (const FileUtils::IOException& ex) catch (const FileUtils::IOException&)
{ {
LOG(Error,"error reading process path with mode " + intToStr(m_mode)); LOG(Error,"error reading process path with mode " + intToStr(m_mode));
reportError("Unable to determine path of updater"); reportError("Unable to determine path of updater");