From: Gerald Pfeifer Subject: [PATCH] windowscodecs: Move from_sRGB_component into the same section as its sole user. Message-Id: <20190714165536.CFC7A33E31@hamza.pair.com> Date: Sun, 14 Jul 2019 18:55:25 +0200 (CEST) This quells one compiler warning I've been getting (with Clang, but GCC should warn as well). Right now there are so many warnings, it's hard to find new or more serious ones. Gerald --- dlls/windowscodecs/converter.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/windowscodecs/converter.c b/dlls/windowscodecs/converter.c index 0d7a3b745f..48cb3dcef2 100644 --- a/dlls/windowscodecs/converter.c +++ b/dlls/windowscodecs/converter.c @@ -84,13 +84,6 @@ typedef struct FormatConverter { CRITICAL_SECTION lock; /* must be held when initialized */ } FormatConverter; -/* https://www.w3.org/Graphics/Color/srgb */ -static inline float from_sRGB_component(float f) -{ - if (f <= 0.04045f) return f / 12.92f; - return powf((f + 0.055f) / 1.055f, 2.4f); -} - static inline float to_sRGB_component(float f) { if (f <= 0.0031308f) return 12.92f * f; @@ -98,6 +91,13 @@ static inline float to_sRGB_component(float f) } #if 0 /* FIXME: enable once needed */ +/* https://www.w3.org/Graphics/Color/srgb */ +static inline float from_sRGB_component(float f) +{ + if (f <= 0.04045f) return f / 12.92f; + return powf((f + 0.055f) / 1.055f, 2.4f); +} + static void from_sRGB(BYTE *bgr) { float r, g, b; -- 2.21.0