]> Pileus Git - ~andy/gtk/commitdiff
Add missing <stdlib.h> include. Add ifdef so we compile without warnings
authorDarin Adler <darin@src.gnome.org>
Wed, 18 Jul 2001 04:25:04 +0000 (04:25 +0000)
committerDarin Adler <darin@src.gnome.org>
Wed, 18 Jul 2001 04:25:04 +0000 (04:25 +0000)
* gdk-pixbuf-csource.c: Add missing <stdlib.h> include.
* io-png.c: (setup_png_transformations): Add ifdef so we compile
without warnings with G_DISABLE_CHECKS on.
* io-pnm.c: (gdk_pixbuf__pnm_image_load_increment): Add a missing
const.
* io-wbmp.c: (getin), (get_mbi): Add a missing const.
* io-xbm.c: (gdk_pixbuf__xbm_image_load_real): Get rid of some
unused locals and add an initial value to quiet the compiler's
unintialized variable warning.
* pixops/pixops.c: Put an ifdef around some dead code.

gdk-pixbuf/ChangeLog
gdk-pixbuf/gdk-pixbuf-csource.c
gdk-pixbuf/io-png.c
gdk-pixbuf/io-pnm.c
gdk-pixbuf/io-wbmp.c
gdk-pixbuf/io-xbm.c
gdk-pixbuf/pixops/pixops.c

index 0f920e99a9b4c304f51dae8f1f4040d84a6bb7b9..16e788ac14d2aa2f171c5b477b6fd0134895e84c 100644 (file)
@@ -1,3 +1,16 @@
+2001-07-17  Darin Adler  <darin@bentspoon.com>
+
+       * gdk-pixbuf-csource.c: Add missing <stdlib.h> include.
+       * io-png.c: (setup_png_transformations): Add ifdef so we compile
+       without warnings with G_DISABLE_CHECKS on.
+       * io-pnm.c: (gdk_pixbuf__pnm_image_load_increment): Add a missing
+       const.
+       * io-wbmp.c: (getin), (get_mbi): Add a missing const.
+       * io-xbm.c: (gdk_pixbuf__xbm_image_load_real): Get rid of some
+       unused locals and add an initial value to quiet the compiler's
+       unintialized variable warning.
+       * pixops/pixops.c: Put an ifdef around some dead code.
+
 Thu Jul  5 10:17:15 2001  Owen Taylor  <otaylor@redhat.com>
 
        * pixops/Makefile.am (noinst_LTLIBRARIES): Switch
index 6f931883928f92aa9d86072c57c1b480e9fdabcf..e64df4fcb326702a7cd16fe398dc1b11fa733e1a 100644 (file)
@@ -22,6 +22,7 @@
 #include "gdk-pixbuf.h"
 #include "gdk-pixdata.h"
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 
 
index 611bc9b0600fa8e92f83c7ba6527139c6fb029fe..0e582eb9068058a4817c8c03d10fe6d71e6423ce 100644 (file)
@@ -40,7 +40,9 @@ setup_png_transformations(png_structp png_read_ptr, png_infop png_info_ptr,
 {
         png_uint_32 width, height;
         int bit_depth, color_type, interlace_type, compression_type, filter_type;
+#ifndef G_DISABLE_CHECKS
         int channels;
+#endif
         
         /* Get the image info */
 
index dfa5cb3467f062631d607866fdb887d883e9bb6d..6bba2285cb3d9bec6e2ab53fee3b46e2e2a3d52d 100644 (file)
@@ -840,7 +840,7 @@ gdk_pixbuf__pnm_image_load_increment (gpointer data,
        PnmIOBuffer *inbuf;
        guchar *old_byte;
        guint old_nbytes;
-       guchar *bufhd;
+       const guchar *bufhd;
        guint num_left, spinguard;
        gint retval;
        
index 1537d83d624eb36b8a5c7fc0fc4a47e7bb32f755..c495b21cbf668f0951c8edd72dad11dc007718c4 100644 (file)
@@ -160,7 +160,7 @@ static gboolean gdk_pixbuf__wbmp_image_stop_load(gpointer data,
 }
 
 static gboolean
-getin(struct wbmp_progressive_state *context, guchar **buf, guint *buf_size, guchar *ptr, int datum_size)
+getin(struct wbmp_progressive_state *context, const guchar **buf, guint *buf_size, guchar *ptr, int datum_size)
 {
   int last_num, buf_num;
 
@@ -195,7 +195,7 @@ save_rest(struct wbmp_progressive_state *context, const guchar *buf, guint buf_s
 }
 
 static gboolean
-get_mbi(struct wbmp_progressive_state *context, guchar **buf, guint *buf_size, int *val)
+get_mbi(struct wbmp_progressive_state *context, const guchar **buf, guint *buf_size, int *val)
 {
   guchar intbuf[16];
   int i, n;
index 0041488eb8175e3499d46ddd17414620fc565d71..47ce269f67dfb5a1f8b444b61f5e2b59b06a226e 100644 (file)
@@ -272,9 +272,9 @@ gdk_pixbuf__xbm_image_load_real (FILE *f, XBMData *context, GError **error)
        guchar *pixels;
        guint row_stride;
        int x, y;
-       int reg, bits;
+       int reg = 0; /* Quiet compiler */
+       int bits;
 
-       int num_pixs;
        GdkPixbuf *pixbuf;
 
        if (!read_bitmap_file_data (f, &w, &h, &data, &x_hot, &y_hot)) {
index 7a13e043baec1faf213bd1b915f828d35c8d568c..0dc51d9f75d731a8d77d2ef4120168212a7a33ae 100644 (file)
@@ -818,6 +818,7 @@ scale_line_22_33_mmx_stub (int *weights, int n_x, int n_y,
 }
 #endif /* USE_MMX */
 
+#ifdef SCALE_LINE_22_33_USED /* This dead code would need changes if we wanted to use it */
 static guchar *
 scale_line_22_33 (int *weights, int n_x, int n_y,
                  guchar *dest, guchar *dest_end, int dest_channels, int dest_has_alpha,
@@ -874,6 +875,7 @@ scale_line_22_33 (int *weights, int n_x, int n_y,
   
   return dest;
 }
+#endif /* SCALE_LINE_22_33_USED */
 
 static void
 process_pixel (int *weights, int n_x, int n_y,