Use #pragma warning only in MSC compiler

This commit is contained in:
David Capello 2014-08-14 23:38:06 -03:00
parent badc334f21
commit dfc1ecd2da
6 changed files with 12 additions and 0 deletions

View File

@ -47,7 +47,9 @@ namespace app {
using namespace ui;
// Disable warning about usage of "this" in initializer list.
#ifdef _MSC_VER
#pragma warning(disable:4355)
#endif
// Window used to show canvas parameters.
class CanvasSizeWindow : public Window

View File

@ -92,7 +92,9 @@ static CursorType rotated_rotate_cursors[] = {
kRotateSECursor
};
#ifdef _MSC_VER
#pragma warning(disable:4355) // warning C4355: 'this' : used in base member initializer list
#endif
StandbyState::StandbyState()
: m_decorator(new Decorator(this))

View File

@ -20,7 +20,9 @@
using namespace base;
#ifdef _MSC_VER
#pragma warning (disable: 4996)
#endif
TEST(FileHandle, Descriptors)
{

View File

@ -17,7 +17,9 @@
#include "base/scoped_lock.h"
// It is used so MSVC doesn't complain about deprecated POSIX names.
#ifdef _MSC_VER
#pragma warning(disable:4996)
#endif
using namespace std;

View File

@ -11,7 +11,9 @@
#include "base/string.h"
#include "she/clipboard.h"
#ifdef _MSC_VER
#pragma warning(disable:4996) // To void MSVC warning about std::copy() with unsafe arguments
#endif
namespace she {

View File

@ -9,7 +9,9 @@
#include <algorithm>
#include <windows.h>
#ifdef _MSC_VER
#pragma warning(disable:4996) // To void MSVC warning about std::copy() with unsafe arguments
#endif
namespace {