mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-07-20 20:25:00 -04:00
Use _MSC_VER for MSVC-specific pragmas
These aren't used on mingw so they need to be surrounded by #ifdef _MSC_VER
This commit is contained in:
@@ -37,8 +37,10 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4996) //depricated warnings
|
||||
#pragma warning(disable:4244) //64bit defensive mechanism, fixed the ones that mattered
|
||||
#endif
|
||||
#include <winsock2.h>
|
||||
#include <ws2tcpip.h>
|
||||
#else
|
||||
|
||||
@@ -22,7 +22,11 @@
|
||||
#if _MSC_VER >= 1200
|
||||
#pragma warning(push)
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4201) // anonymous unions warning
|
||||
#endif
|
||||
|
||||
#if defined(_X86_) || defined(_IA64_)
|
||||
#pragma pack(4)
|
||||
#endif
|
||||
@@ -1676,8 +1680,10 @@ typedef struct _D3DDEVINFO_D3DVERTEXSTATS
|
||||
#if _MSC_VER >= 1200
|
||||
#pragma warning(pop)
|
||||
#else
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(default:4201)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* (DIRECT3D_VERSION >= 0x0800) */
|
||||
#endif /* _D3D8TYPES(P)_H_ */
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable : 4214) /* nonstandard extension, non-int bitfield */
|
||||
#pragma warning(disable : 4054) /* function pointer to data pointer */
|
||||
#endif
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#define COBJMACROS
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef _MSC_VER
|
||||
/* conversion from data/function pointer */
|
||||
#pragma warning(disable: 4152)
|
||||
#endif
|
||||
|
||||
#include "../graphics-hook-info.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable : 4152) /* casting func ptr to void */
|
||||
#endif
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <windows.h>
|
||||
#include "obfuscate.h"
|
||||
|
||||
@@ -23,7 +23,7 @@ extern "C" {
|
||||
|
||||
#include <obs.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4244)
|
||||
#pragma warning(disable : 4204)
|
||||
@@ -32,7 +32,7 @@ extern "C" {
|
||||
#include <libavcodec/avcodec.h>
|
||||
#include <libavutil/log.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user