Skip to content

Commit b53615b

Browse files
committed
ignore another function cast warning
1 parent dd3dd87 commit b53615b

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

src/proxy/d3d11.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ FARPROC d3d11_on_12_create_device_ptr = nullptr;
2424
#pragma GCC diagnostic push
2525
#pragma GCC diagnostic ignored "-Wcast-function-type"
2626
#endif
27+
#if defined(__clang__)
28+
#pragma clang diagnostic push
29+
#pragma clang diagnostic ignored "-Wcast-function-type-mismatch"
30+
#endif
2731

2832
DLL_EXPORT HRESULT D3D11CoreCreateDevice(void* fact,
2933
void* adapt,
@@ -81,6 +85,9 @@ DLL_EXPORT HRESULT D3D11On12CreateDevice(void* pDevice,
8185
ppDevice, ppImmediateContext, pChosenFeatureLevel);
8286
}
8387

88+
#if defined(__clang__)
89+
#pragma clang diagnostic pop
90+
#endif
8491
#if defined(__MINGW32__)
8592
#pragma GCC diagnostic pop
8693
#endif

src/proxy/dsound.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ FARPROC direct_sound_capture_create_8_ptr = nullptr;
3030
#pragma GCC diagnostic push
3131
#pragma GCC diagnostic ignored "-Wcast-function-type"
3232
#endif
33+
#if defined(__clang__)
34+
#pragma clang diagnostic push
35+
#pragma clang diagnostic ignored "-Wcast-function-type-mismatch"
36+
#endif
3337

3438
// #include "dsound.h"
3539

@@ -106,6 +110,9 @@ DLL_EXPORT HRESULT WINAPI DirectSoundCaptureCreate8(LPCGUID pcGuidDevice,
106110
direct_sound_capture_create_8_ptr)(pcGuidDevice, ppDSC8, pUnkOuter);
107111
}
108112

113+
#if defined(__clang__)
114+
#pragma clang diagnostic pop
115+
#endif
109116
#if defined(__MINGW32__)
110117
#pragma GCC diagnostic pop
111118
#endif

src/proxy/xinput1_3.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ FARPROC xinput_power_off_controller_ptr = nullptr;
3434
#pragma GCC diagnostic push
3535
#pragma GCC diagnostic ignored "-Wcast-function-type"
3636
#endif
37+
#if defined(__clang__)
38+
#pragma clang diagnostic push
39+
#pragma clang diagnostic ignored "-Wcast-function-type-mismatch"
40+
#endif
3741

3842
DLL_EXPORT void XInputEnable(BOOL enable) {
3943
reinterpret_cast<decltype(&XInputEnable)>(xinput_enable_ptr)(enable);
@@ -93,6 +97,9 @@ DLL_EXPORT DWORD XInputPowerOffController(DWORD dwUserIndex) {
9397
dwUserIndex);
9498
}
9599

100+
#if defined(__clang__)
101+
#pragma clang diagnostic pop
102+
#endif
96103
#if defined(__MINGW32__)
97104
#pragma GCC diagnostic pop
98105
#endif

0 commit comments

Comments
 (0)