Skip to content

Commit

Permalink
wasapi: suppress warnings
Browse files Browse the repository at this point in the history
Suppress warnings for missing braces:

    src/audio/capture/wasapi.cpp:61:41: warning: suggest braces around initialization of subobject [-Wmissing-braces]
       61 | const GUID KSDATAFORMAT_SUBTYPE_PCM = { STATIC_KSDATAFORMAT_SUBTYPE_PCM };

The macro is actually defined with Mingw-w64.
  • Loading branch information
MartinPulec committed Jul 29, 2024
1 parent a95f842 commit 61bbc65
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/audio/capture/wasapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,11 @@
const IID IID_IAudioCaptureClient = __uuidof(IAudioCaptureClient);
const static GUID IDevice_FriendlyName = { 0xa45c254e, 0xdf1c, 0x4efd, { 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0 } };
const static PROPERTYKEY PKEY_Device_FriendlyName = { IDevice_FriendlyName, 14 };
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-braces" // not our issue - defined by Mingw-w64
const GUID KSDATAFORMAT_SUBTYPE_PCM = { STATIC_KSDATAFORMAT_SUBTYPE_PCM };
const GUID KSDATAFORMAT_SUBTYPE_IEEE_FLOAT = { STATIC_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT };
#pragma GCC diagnostic pop

using std::cout;
using std::ostringstream;
Expand Down
3 changes: 3 additions & 0 deletions src/audio/playback/wasapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ const IID IID_IAudioClient = __uuidof(IAudioClient);
const IID IID_IAudioRenderClient = __uuidof(IAudioRenderClient);
const static GUID IDevice_FriendlyName = { 0xa45c254e, 0xdf1c, 0x4efd, { 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0 } };
const static PROPERTYKEY PKEY_Device_FriendlyName = { IDevice_FriendlyName, 14 };
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-braces" // not our issue - defined by Mingw-w64
const static GUID UG_KSDATAFORMAT_SUBTYPE_PCM = { STATIC_KSDATAFORMAT_SUBTYPE_PCM };
#pragma GCC diagnostic pop


using std::cout;
Expand Down

0 comments on commit 61bbc65

Please sign in to comment.