[babl] babl: respond to gcc warnings



commit 387bdc24f7be23d49539597794689bae49f3275e
Author: Øyvind Kolås <pippin gimp org>
Date:   Sat Aug 19 02:44:30 2017 +0200

    babl: respond to gcc warnings

 babl/babl-conversion.c |    4 ++--
 babl/babl-fish.c       |    3 +--
 babl/babl-internal.h   |    4 ++--
 3 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/babl/babl-conversion.c b/babl/babl-conversion.c
index 9e45a5b..c2b0c6b 100644
--- a/babl/babl-conversion.c
+++ b/babl/babl-conversion.c
@@ -29,8 +29,8 @@
 Babl *
 _conversion_new (const char    *name,
                  int            id,
-                 Babl          *source,
-                 Babl          *destination,
+                 const Babl    *source,
+                 const Babl    *destination,
                  BablFuncLinear linear,
                  BablFuncPlane  plane,
                  BablFuncPlanar planar,
diff --git a/babl/babl-fish.c b/babl/babl-fish.c
index d8b7c7e..4cc4924 100644
--- a/babl/babl-fish.c
+++ b/babl/babl-fish.c
@@ -129,7 +129,6 @@ babl_conversion_find (const void *source,
      const Babl *srgb_source = BABL (source)->model.data ? BABL (source)->model.data:source;
      const Babl *srgb_destination = BABL (destination)->model.data ? BABL 
(destination)->model.data:destination;
      Babl *reference = babl_conversion_find (srgb_source, srgb_destination);
-     BablConversion *ret;
 
   /* when conversions are sought between models, with non-sRGB chromaticities,
      we create the needed conversions from existing ones on the fly, and
@@ -141,7 +140,7 @@ babl_conversion_find (const void *source,
      switch (reference->instance.class_type)
      {
         case BABL_CONVERSION_LINEAR:
-          return _conversion_new ("", 0, source, destination,
+          return _conversion_new ("", 0, (void*)source, (void*)destination,
                             reference->conversion.function.linear,
                             NULL,
                             NULL,
diff --git a/babl/babl-internal.h b/babl/babl-internal.h
index 2ac404a..9181bd9 100644
--- a/babl/babl-internal.h
+++ b/babl/babl-internal.h
@@ -326,8 +326,8 @@ babl_model_with_space (const char *name, const Babl *space);
 Babl *
 _conversion_new (const char    *name,
                  int            id,
-                 Babl          *source,
-                 Babl          *destination,
+                 const Babl    *source,
+                 const Babl    *destination,
                  BablFuncLinear linear,
                  BablFuncPlane  plane,
                  BablFuncPlanar planar,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]