Kaydet (Commit) ee4a456d authored tarafından Mike Kaganski's avatar Mike Kaganski

sal: MSVC: pragma warning: make more specific, remove obsolete

Change-Id: Ib7ad23257a966447d627b4f73698d9298790f759
Reviewed-on: https://gerrit.libreoffice.org/49042Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMike Kaganski <mike.kaganski@collabora.com>
üst d297fad6
...@@ -78,7 +78,7 @@ struct SAL_WARN_UNUSED OUStringLiteral1_ { ...@@ -78,7 +78,7 @@ struct SAL_WARN_UNUSED OUStringLiteral1_ {
#if defined _MSC_VER && _MSC_VER <= 1900 && !defined __clang__ #if defined _MSC_VER && _MSC_VER <= 1900 && !defined __clang__
// Visual Studio 2015 // Visual Studio 2015
using OUStringLiteral1 = OUStringLiteral1_; using OUStringLiteral1 = OUStringLiteral1_;
#pragma warning(disable: 4239) #pragma warning(disable: 4239) // nonstandard extension used: 'argument': conversion from 'rtl::OUStringLiteral1_' to 'rtl::OUStringLiteral1_ &'
#else #else
using OUStringLiteral1 = OUStringLiteral1_ const; using OUStringLiteral1 = OUStringLiteral1_ const;
#endif #endif
......
...@@ -22,13 +22,7 @@ ...@@ -22,13 +22,7 @@
#include <string> #include <string>
#include <stdexcept> #include <stdexcept>
#if defined _MSC_VER
#pragma warning(push,1)
#endif
#include <objbase.h> #include <objbase.h>
#if defined _MSC_VER
#pragma warning(pop)
#endif
namespace sal namespace sal
{ {
......
...@@ -25,19 +25,11 @@ ...@@ -25,19 +25,11 @@
#include <osl/file.h> #include <osl/file.h>
#include <osl/mutex.h> #include <osl/mutex.h>
#ifdef _MSC_VER
#pragma warning(push,1)
#endif
#if !defined WIN32_LEAN_AND_MEAN #if !defined WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN # define WIN32_LEAN_AND_MEAN
#endif #endif
#include <windows.h> #include <windows.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#define PATHTYPE_ERROR 0 #define PATHTYPE_ERROR 0
#define PATHTYPE_RELATIVE 1 #define PATHTYPE_RELATIVE 1
#define PATHTYPE_ABSOLUTE_UNC 2 #define PATHTYPE_ABSOLUTE_UNC 2
......
...@@ -197,13 +197,7 @@ osl_getAsciiFunctionSymbol( oslModule Module, const sal_Char *pSymbol ) ...@@ -197,13 +197,7 @@ osl_getAsciiFunctionSymbol( oslModule Module, const sal_Char *pSymbol )
/* Implementation for Windows NT, 2K and XP (2K and XP could use the above method too) */ /* Implementation for Windows NT, 2K and XP (2K and XP could use the above method too) */
/***************************************************************************************/ /***************************************************************************************/
#ifdef _MSC_VER
#pragma warning(push,1) /* disable warnings within system headers */
#endif
#include <imagehlp.h> #include <imagehlp.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif
typedef BOOL (WINAPI *SymInitialize_PROC)( typedef BOOL (WINAPI *SymInitialize_PROC)(
HANDLE hProcess, HANDLE hProcess,
......
...@@ -18,13 +18,8 @@ ...@@ -18,13 +18,8 @@
*/ */
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#ifdef _MSC_VER
#pragma warning(push,1) /* disable warnings within system headers */
#endif
#include <windows.h> #include <windows.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#include <wchar.h> #include <wchar.h>
#include "nlsupport.hxx" #include "nlsupport.hxx"
......
...@@ -19,13 +19,8 @@ ...@@ -19,13 +19,8 @@
#include "system.h" #include "system.h"
#include <string.h> #include <string.h>
#ifdef _MSC_VER
#pragma warning(push,1) /* disable warnings within system headers */
#endif
#include <shellapi.h> #include <shellapi.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#include <cassert> #include <cassert>
#include <memory> #include <memory>
...@@ -320,10 +315,6 @@ static struct CommandArgs_Impl g_command_args = ...@@ -320,10 +315,6 @@ static struct CommandArgs_Impl g_command_args =
nullptr nullptr
}; };
#ifdef _MSC_VER
#pragma warning( push )
#pragma warning( disable: 4100 )
#endif
static rtl_uString ** osl_createCommandArgs_Impl (int argc, char **) static rtl_uString ** osl_createCommandArgs_Impl (int argc, char **)
{ {
rtl_uString ** ppArgs = rtl_uString ** ppArgs =
...@@ -369,9 +360,6 @@ static rtl_uString ** osl_createCommandArgs_Impl (int argc, char **) ...@@ -369,9 +360,6 @@ static rtl_uString ** osl_createCommandArgs_Impl (int argc, char **)
return ppArgs; return ppArgs;
} }
#ifdef _MSC_VER
#pragma warning( pop )
#endif
oslProcessError SAL_CALL osl_getExecutableFile( rtl_uString **ppustrFile ) oslProcessError SAL_CALL osl_getExecutableFile( rtl_uString **ppustrFile )
{ {
......
...@@ -19,13 +19,7 @@ ...@@ -19,13 +19,7 @@
#ifndef WIN32_LEAN_AND_MEAN #ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN # define WIN32_LEAN_AND_MEAN
# ifdef _MSC_VER
# pragma warning(push,1) /* disable warnings within system headers */
# endif
# include <windows.h> # include <windows.h>
# ifdef _MSC_VER
# pragma warning(pop)
# endif
# undef WIN32_LEAN_AND_MEAN # undef WIN32_LEAN_AND_MEAN
#endif #endif
......
...@@ -43,8 +43,6 @@ ...@@ -43,8 +43,6 @@
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
// winsock2.h includes windows.h // winsock2.h includes windows.h
#pragma warning(push,1) /* disable warnings within system headers */
#pragma warning(disable:4917)
#include <winsock2.h> #include <winsock2.h>
#include <wsipx.h> #include <wsipx.h>
#include <ws2tcpip.h> #include <ws2tcpip.h>
...@@ -52,6 +50,5 @@ ...@@ -52,6 +50,5 @@
#ifndef NO_DEBUG_CRT #ifndef NO_DEBUG_CRT
#include <crtdbg.h> #include <crtdbg.h>
#endif #endif
#pragma warning(pop)
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -193,13 +193,7 @@ typedef pthread_mutex_t rtl_memory_lock_type; ...@@ -193,13 +193,7 @@ typedef pthread_mutex_t rtl_memory_lock_type;
#elif defined(_WIN32) #elif defined(_WIN32)
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#ifdef _MSC_VER
#pragma warning(push,1) /* disable warnings within system headers */
#endif
#include <windows.h> #include <windows.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif
typedef CRITICAL_SECTION rtl_memory_lock_type; typedef CRITICAL_SECTION rtl_memory_lock_type;
......
...@@ -19,10 +19,6 @@ ...@@ -19,10 +19,6 @@
#include <sal/config.h> #include <sal/config.h>
#ifdef _MSC_VER
#pragma warning(disable:4738) // storing 32-bit float result in memory, possible loss of performance
#endif
#include <cassert> #include <cassert>
#include <cstdlib> #include <cstdlib>
......
...@@ -19,10 +19,6 @@ ...@@ -19,10 +19,6 @@
#include <sal/config.h> #include <sal/config.h>
#ifdef _MSC_VER
#pragma warning(disable:4738) // storing 32-bit float result in memory, possible loss of performance
#endif
#include <cassert> #include <cassert>
#include <cstdlib> #include <cstdlib>
#include <limits> #include <limits>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment