forked from AuroraMiddleware/gtk
Add a cast to avoid compiler warnings.
2005-08-30 Matthias Clasen <mclasen@redhat.com> * io-png.c (png_save_to_callback_write_func): Add a cast to avoid compiler warnings. * pixops/timescale.c (main): Declare src_buf, dest_buf as unsigned to avoid compiler warnings. * gdk-pixbuf-io.h: Declare the prefix and mask members of GdkPixbufModulePattern as char*, to avoid compiler warnings. * io-ani.c (ani_load_chunk): Use g_try_new() in some places.
This commit is contained in:
parent
4a481c6d87
commit
0aa27306aa
@ -1,3 +1,16 @@
|
||||
2005-08-30 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* io-png.c (png_save_to_callback_write_func): Add a cast
|
||||
to avoid compiler warnings.
|
||||
|
||||
* pixops/timescale.c (main): Declare src_buf, dest_buf as
|
||||
unsigned to avoid compiler warnings.
|
||||
|
||||
* gdk-pixbuf-io.h: Declare the prefix and mask members of
|
||||
GdkPixbufModulePattern as char*, to avoid compiler warnings.
|
||||
|
||||
* io-ani.c (ani_load_chunk): Use g_try_new() in some places.
|
||||
|
||||
2005-08-24 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.8.2 ===
|
||||
|
@ -52,7 +52,7 @@ format_check (GdkPixbufModule *module, guchar *buffer, int size)
|
||||
gchar m;
|
||||
GdkPixbufModulePattern *pattern;
|
||||
gboolean anchored;
|
||||
guchar *prefix, *mask;
|
||||
gchar *prefix, *mask;
|
||||
|
||||
for (pattern = module->info->signature; pattern->prefix; pattern++) {
|
||||
if (pattern->mask && pattern->mask[0] == '*') {
|
||||
|
@ -75,8 +75,8 @@ typedef void (* GdkPixbufModuleUpdatedFunc) (GdkPixbuf *pixbuf,
|
||||
|
||||
typedef struct _GdkPixbufModulePattern GdkPixbufModulePattern;
|
||||
struct _GdkPixbufModulePattern {
|
||||
unsigned char *prefix;
|
||||
unsigned char *mask;
|
||||
char *prefix;
|
||||
char *mask;
|
||||
int relevance;
|
||||
};
|
||||
|
||||
|
@ -366,12 +366,10 @@ ani_load_chunk (AniLoaderContext *context, GError **error)
|
||||
context->animation->width = 0;
|
||||
context->animation->height = 0;
|
||||
|
||||
context->animation->pixbufs = (GdkPixbuf**) g_try_malloc (sizeof (GdkPixbuf*) * context->NumFrames);
|
||||
if (context->animation->pixbufs)
|
||||
memset (context->animation->pixbufs, 0, sizeof (GdkPixbuf*) * context->NumFrames);
|
||||
|
||||
context->animation->delay = (guint32*) g_try_malloc (sizeof (guint32) * context->NumSteps);
|
||||
context->animation->sequence = (guint32*) g_try_malloc (sizeof (guint32) * context->NumSteps);
|
||||
context->animation->pixbufs = g_try_new0 (GdkPixbuf*, context->NumFrames);
|
||||
context->animation->delay = g_try_new (gint, context->NumSteps);
|
||||
context->animation->sequence = g_try_new (gint, context->NumSteps);
|
||||
|
||||
if (!context->animation->pixbufs ||
|
||||
!context->animation->delay ||
|
||||
!context->animation->sequence)
|
||||
@ -442,7 +440,7 @@ ani_load_chunk (AniLoaderContext *context, GError **error)
|
||||
return FALSE;
|
||||
}
|
||||
context->title[context->chunk_size] = 0;
|
||||
read_int8 (context, context->title, context->chunk_size);
|
||||
read_int8 (context, (guchar *)context->title, context->chunk_size);
|
||||
#ifdef DEBUG_ANI
|
||||
g_print ("INAM %s\n", context->title);
|
||||
#endif
|
||||
@ -461,7 +459,7 @@ ani_load_chunk (AniLoaderContext *context, GError **error)
|
||||
return FALSE;
|
||||
}
|
||||
context->author[context->chunk_size] = 0;
|
||||
read_int8 (context, context->author, context->chunk_size);
|
||||
read_int8 (context, (guchar *)context->author, context->chunk_size);
|
||||
#ifdef DEBUG_ANI
|
||||
g_print ("IART %s\n", context->author);
|
||||
#endif
|
||||
|
@ -754,7 +754,7 @@ png_save_to_callback_write_func (png_structp png_ptr,
|
||||
{
|
||||
SaveToFunctionIoPtr *ioptr = png_get_io_ptr (png_ptr);
|
||||
|
||||
if (!ioptr->save_func (data, length, ioptr->error, ioptr->user_data)) {
|
||||
if (!ioptr->save_func ((gchar *)data, length, ioptr->error, ioptr->user_data)) {
|
||||
/* If save_func has already set an error, which it
|
||||
should have done, this won't overwrite it. */
|
||||
png_error (png_ptr, "write function failed");
|
||||
|
@ -118,7 +118,7 @@ dump_array (double times[3][3][4])
|
||||
int main (int argc, char **argv)
|
||||
{
|
||||
int src_width, src_height, dest_width, dest_height;
|
||||
char *src_buf, *dest_buf;
|
||||
unsigned char *src_buf, *dest_buf;
|
||||
int src_index, dest_index;
|
||||
int i;
|
||||
double scale_times[3][3][4];
|
||||
|
Loading…
Reference in New Issue
Block a user