[dia] [warningectomy] no complaints about gdk-pixbuf lack of const



commit a845ca54e5120dad2f3d4910cd418636546e2478
Author: Hans Breuer <hans breuer org>
Date:   Sun May 20 20:24:25 2012 +0200

    [warningectomy] no complaints about gdk-pixbuf lack of const
    
    AFAICT gdk_pixbuf_save_to_callback() is not modifying the passed in
    pixbuf, but it doesn't decalre it const either. Cast away ours.

 lib/prop_pixbuf.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/lib/prop_pixbuf.c b/lib/prop_pixbuf.c
index 37e861c..21d2809 100644
--- a/lib/prop_pixbuf.c
+++ b/lib/prop_pixbuf.c
@@ -196,7 +196,7 @@ pixbuf_encode_base64 (const GdkPixbuf *pixbuf)
 
   ed.array = g_byte_array_new ();
 
-  if (!gdk_pixbuf_save_to_callback (pixbuf, _pixbuf_encode, &ed, "png", &error, NULL)) {
+  if (!gdk_pixbuf_save_to_callback ((GdkPixbuf *)pixbuf, _pixbuf_encode, &ed, "png", &error, NULL)) {
     message_error (_("Saving inline pixbuf failed:\n%s"), error->message);
     g_error_free (error);
     return NULL;



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