[gimp] Fix more g_mapped_file_free() warnings



commit 03e9d6de7178d20e7192887acae56ec73da643c2
Author: Martin Nordholts <martinn src gnome org>
Date:   Mon Jul 20 22:10:16 2009 +0200

    Fix more g_mapped_file_free() warnings

 plug-ins/common/file-wmf.c |    8 ++++++++
 plug-ins/common/lcms.c     |    4 ++++
 2 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/plug-ins/common/file-wmf.c b/plug-ins/common/file-wmf.c
index 1dabd3e..81a6a21 100644
--- a/plug-ins/common/file-wmf.c
+++ b/plug-ins/common/file-wmf.c
@@ -874,7 +874,11 @@ wmf_get_pixbuf (const gchar *filename,
       wmf_api_destroy (API);
     }
 
+#if GLIB_CHECK_VERSION(2, 21, 3)
+  g_mapped_file_unref (file);
+#else
   g_mapped_file_free (file);
+#endif
 
   return pixels;
 }
@@ -959,7 +963,11 @@ wmf_load_file (const gchar  *filename,
       wmf_api_destroy (API);
     }
 
+#if GLIB_CHECK_VERSION(2, 21, 3)
+  g_mapped_file_unref (file);
+#else
   g_mapped_file_free (file);
+#endif
 
   /* FIXME: improve error message */
   g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
diff --git a/plug-ins/common/lcms.c b/plug-ins/common/lcms.c
index f8b869c..6935882 100644
--- a/plug-ins/common/lcms.c
+++ b/plug-ins/common/lcms.c
@@ -1133,7 +1133,11 @@ lcms_load_profile (const gchar *filename,
                  gimp_filename_to_utf8 (filename));
     }
 
+#if GLIB_CHECK_VERSION(2, 21, 3)
+  g_mapped_file_unref (file);
+#else
   g_mapped_file_free (file);
+#endif
 
   return profile;
 }



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