From bf1fdfd4fbb8e43abd01940d7e570856bf2ad4c3 Mon Sep 17 00:00:00 2001 From: Andrei Golubev Date: Thu, 27 May 2021 10:35:04 +0200 Subject: [PATCH] qpixellayout.cpp: mark some specializations of fetchPixel as unused Triggers -Wunused-function warning (a.k.a. error) when building this part of the code: qpixellayout.cpp:292:25: error: unused function 'fetchPixel' [-Werror,-Wunused-function] inline uint QT_FASTCALL fetchPixel(const uchar *src, int index) ^ qpixellayout.cpp:300:25: error: unused function 'fetchPixel' [-Werror,-Wunused-function] inline uint QT_FASTCALL fetchPixel(const uchar *src, int index) ^ qpixellayout.cpp:308:25: error: unused function 'fetchPixel' [-Werror,-Wunused-function] inline uint QT_FASTCALL fetchPixel(const uchar *src, int index) Change-Id: I8ff40e3cf02f8a7ad7534f58ac23eeb8eb716d3a Reviewed-by: Allan Sandfeld Jensen --- src/gui/painting/qpixellayout.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/painting/qpixellayout.cpp b/src/gui/painting/qpixellayout.cpp index e32d4e124a..f181d78a10 100644 --- a/src/gui/painting/qpixellayout.cpp +++ b/src/gui/painting/qpixellayout.cpp @@ -289,6 +289,7 @@ inline uint QT_FASTCALL fetchPixel(const uchar *src, int in } template <> +[[maybe_unused]] inline uint QT_FASTCALL fetchPixel(const uchar *src, int index) { // We have to do the conversion in fetch to fit into a 32bit uint @@ -297,6 +298,7 @@ inline uint QT_FASTCALL fetchPixel(const uchar *src, int in } template <> +[[maybe_unused]] inline uint QT_FASTCALL fetchPixel(const uchar *src, int index) { // We have to do the conversion in fetch to fit into a 32bit uint @@ -305,6 +307,7 @@ inline uint QT_FASTCALL fetchPixel(const uchar *src, in } template <> +[[maybe_unused]] inline uint QT_FASTCALL fetchPixel(const uchar *src, int index) { // We have to do the conversion in fetch to fit into a 32bit uint