diff --git a/src/common/BUILD.gn b/src/common/BUILD.gn index 3f5a09b378..244baebc48 100644 --- a/src/common/BUILD.gn +++ b/src/common/BUILD.gn @@ -104,6 +104,7 @@ config("dawn_internal") { "-Wshadow-field", "-Wstrict-prototypes", "-Wtautological-unsigned-zero-compare", + "-Wnon-c-typedef-for-linkage", ] if (is_win) { diff --git a/src/include/dawn/dawn_wsi.h b/src/include/dawn/dawn_wsi.h index e07e74185c..f1a6047b5b 100644 --- a/src/include/dawn/dawn_wsi.h +++ b/src/include/dawn/dawn_wsi.h @@ -59,18 +59,18 @@ typedef struct { } DawnSwapChainImplementation; #if defined(DAWN_ENABLE_BACKEND_D3D12) && defined(__cplusplus) -typedef struct { +struct DawnWSIContextD3D12 { WGPUDevice device = nullptr; -} DawnWSIContextD3D12; +}; #endif #if defined(DAWN_ENABLE_BACKEND_METAL) && defined(__OBJC__) # import -typedef struct { +struct DawnWSIContextMetal { id device = nil; id queue = nil; -} DawnWSIContextMetal; +}; #endif #ifdef DAWN_ENABLE_BACKEND_OPENGL