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 <string>
#include "Platform.h"
#include "StringUtils.h"
/** A set of functions for performing common operations
* on files, throwing exceptions if an operation fails.
*

View File

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

View File

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