[PATCH v2] windowscodecs: Move from_sRGB_component into the same section as its sole sole user.

Gerald Pfeifer gerald at pfeifer.com
Mon Jul 22 15:10:50 CDT 2019


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.

This updated version of the patch takes a request by Dmitry into account
to leave the comment with the w3.org reference at its orginal location.

Thanks,
Gerald
---
 dlls/windowscodecs/converter.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/dlls/windowscodecs/converter.c b/dlls/windowscodecs/converter.c
index 0d7a3b745f..dcc2f05693 100644
--- a/dlls/windowscodecs/converter.c
+++ b/dlls/windowscodecs/converter.c
@@ -85,12 +85,6 @@ typedef struct FormatConverter {
 } 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 +92,12 @@ static inline float to_sRGB_component(float f)
 }
 
 #if 0 /* FIXME: enable once needed */
+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



More information about the wine-devel mailing list