diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-06-09 20:53:54 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-06-09 20:53:54 +0100 |
commit | 35d7a2fb13fc833aa1b654ca6fd6e429e72e6b49 (patch) | |
tree | 257dbf4040c59cf01a5072d35f0c9e5264bba09d /src/gui_dwrite.cpp | |
parent | 63f32603789d1a27c559fc440325955fd0b8b500 (diff) |
patch 8.2.5073: clang on MS-Windows produces warningsv8.2.5073
Problem: Clang on MS-Windows produces warnings.
Solution: Avoid the warnings. (Yegappan Lakshmanan, closes #10546)
Diffstat (limited to 'src/gui_dwrite.cpp')
-rw-r--r-- | src/gui_dwrite.cpp | 52 |
1 files changed, 29 insertions, 23 deletions
diff --git a/src/gui_dwrite.cpp b/src/gui_dwrite.cpp index 62d23e7277..4f24390775 100644 --- a/src/gui_dwrite.cpp +++ b/src/gui_dwrite.cpp @@ -52,6 +52,12 @@ # define __out SAL__out #endif +#ifdef __MINGW32__ +# define UNUSED __attribute__((unused)) +#else +# define UNUSED +#endif + #if (defined(_MSC_VER) && (_MSC_VER >= 1700)) || (__cplusplus >= 201103L) # define FINAL final #else @@ -419,7 +425,7 @@ public: } IFACEMETHOD(IsPixelSnappingDisabled)( - __maybenull void* clientDrawingContext, + __maybenull void* clientDrawingContext UNUSED, __out BOOL* isDisabled) { *isDisabled = FALSE; @@ -427,7 +433,7 @@ public: } IFACEMETHOD(GetCurrentTransform)( - __maybenull void* clientDrawingContext, + __maybenull void* clientDrawingContext UNUSED, __out DWRITE_MATRIX* transform) { // forward the render target's transform @@ -437,7 +443,7 @@ public: } IFACEMETHOD(GetPixelsPerDip)( - __maybenull void* clientDrawingContext, + __maybenull void* clientDrawingContext UNUSED, __out FLOAT* pixelsPerDip) { float dpiX, unused; @@ -447,33 +453,33 @@ public: } IFACEMETHOD(DrawUnderline)( - __maybenull void* clientDrawingContext, - FLOAT baselineOriginX, - FLOAT baselineOriginY, - __in DWRITE_UNDERLINE const* underline, - IUnknown* clientDrawingEffect) + __maybenull void* clientDrawingContext UNUSED, + FLOAT baselineOriginX UNUSED, + FLOAT baselineOriginY UNUSED, + __in DWRITE_UNDERLINE const* underline UNUSED, + IUnknown* clientDrawingEffect UNUSED) { return E_NOTIMPL; } IFACEMETHOD(DrawStrikethrough)( - __maybenull void* clientDrawingContext, - FLOAT baselineOriginX, - FLOAT baselineOriginY, - __in DWRITE_STRIKETHROUGH const* strikethrough, - IUnknown* clientDrawingEffect) + __maybenull void* clientDrawingContext UNUSED, + FLOAT baselineOriginX UNUSED, + FLOAT baselineOriginY UNUSED, + __in DWRITE_STRIKETHROUGH const* strikethrough UNUSED, + IUnknown* clientDrawingEffect UNUSED) { return E_NOTIMPL; } IFACEMETHOD(DrawInlineObject)( - __maybenull void* clientDrawingContext, - FLOAT originX, - FLOAT originY, - IDWriteInlineObject* inlineObject, - BOOL isSideways, - BOOL isRightToLeft, - IUnknown* clientDrawingEffect) + __maybenull void* clientDrawingContext UNUSED, + FLOAT originX UNUSED, + FLOAT originY UNUSED, + IDWriteInlineObject* inlineObject UNUSED, + BOOL isSideways UNUSED, + BOOL isRightToLeft UNUSED, + IUnknown* clientDrawingEffect UNUSED) { return E_NOTIMPL; } @@ -482,10 +488,10 @@ public: __maybenull void* clientDrawingContext, FLOAT baselineOriginX, FLOAT baselineOriginY, - DWRITE_MEASURING_MODE measuringMode, + DWRITE_MEASURING_MODE measuringMode UNUSED, __in DWRITE_GLYPH_RUN const* glyphRun, - __in DWRITE_GLYPH_RUN_DESCRIPTION const* glyphRunDescription, - IUnknown* clientDrawingEffect) + __in DWRITE_GLYPH_RUN_DESCRIPTION const* glyphRunDescription UNUSED, + IUnknown* clientDrawingEffect UNUSED) { TextRendererContext *context = reinterpret_cast<TextRendererContext*>(clientDrawingContext); |