Commit b0bb5ac3 authored by Darin Adler's avatar Darin Adler

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.
parent fa506b18
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
......
......@@ -22,6 +22,7 @@
#include "gdk-pixbuf.h"
#include "gdk-pixdata.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
......
......@@ -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 */
......
......@@ -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;
......
......@@ -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;
......
......@@ -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)) {
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment