summaryrefslogtreecommitdiff
path: root/gdk-pixbuf
diff options
context:
space:
mode:
authorDarin Adler <darin@src.gnome.org>2001-07-18 04:25:04 +0000
committerDarin Adler <darin@src.gnome.org>2001-07-18 04:25:04 +0000
commitb0bb5ac3047f37ddf1a0a9b9c699cccb3b2a097f (patch)
tree8e7c773504d45479feff798d0883a47228a00071 /gdk-pixbuf
parentfa506b18f154287eb90273439fb9e3e29f1c75f3 (diff)
downloadgdk-pixbuf-b0bb5ac3047f37ddf1a0a9b9c699cccb3b2a097f.tar.gz
Add missing <stdlib.h> include. Add ifdef so we compile without warnings
* 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.
Diffstat (limited to 'gdk-pixbuf')
-rw-r--r--gdk-pixbuf/ChangeLog13
-rw-r--r--gdk-pixbuf/gdk-pixbuf-csource.c1
-rw-r--r--gdk-pixbuf/io-png.c2
-rw-r--r--gdk-pixbuf/io-pnm.c2
-rw-r--r--gdk-pixbuf/io-wbmp.c4
-rw-r--r--gdk-pixbuf/io-xbm.c4
-rw-r--r--gdk-pixbuf/pixops/pixops.c2
7 files changed, 23 insertions, 5 deletions
diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog
index 0f920e99a..16e788ac1 100644
--- a/gdk-pixbuf/ChangeLog
+++ b/gdk-pixbuf/ChangeLog
@@ -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
diff --git a/gdk-pixbuf/gdk-pixbuf-csource.c b/gdk-pixbuf/gdk-pixbuf-csource.c
index 6f9318839..e64df4fcb 100644
--- a/gdk-pixbuf/gdk-pixbuf-csource.c
+++ b/gdk-pixbuf/gdk-pixbuf-csource.c
@@ -22,6 +22,7 @@
#include "gdk-pixbuf.h"
#include "gdk-pixdata.h"
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
diff --git a/gdk-pixbuf/io-png.c b/gdk-pixbuf/io-png.c
index 611bc9b06..0e582eb90 100644
--- a/gdk-pixbuf/io-png.c
+++ b/gdk-pixbuf/io-png.c
@@ -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 */
diff --git a/gdk-pixbuf/io-pnm.c b/gdk-pixbuf/io-pnm.c
index dfa5cb346..6bba2285c 100644
--- a/gdk-pixbuf/io-pnm.c
+++ b/gdk-pixbuf/io-pnm.c
@@ -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;
diff --git a/gdk-pixbuf/io-wbmp.c b/gdk-pixbuf/io-wbmp.c
index 1537d83d6..c495b21cb 100644
--- a/gdk-pixbuf/io-wbmp.c
+++ b/gdk-pixbuf/io-wbmp.c
@@ -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;
diff --git a/gdk-pixbuf/io-xbm.c b/gdk-pixbuf/io-xbm.c
index 0041488eb..47ce269f6 100644
--- a/gdk-pixbuf/io-xbm.c
+++ b/gdk-pixbuf/io-xbm.c
@@ -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)) {
diff --git a/gdk-pixbuf/pixops/pixops.c b/gdk-pixbuf/pixops/pixops.c
index 7a13e043b..0dc51d9f7 100644
--- a/gdk-pixbuf/pixops/pixops.c
+++ b/gdk-pixbuf/pixops/pixops.c
@@ -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,