# HG changeset patch # User William Pitcock # Date 1202723850 21600 # Node ID 0a9e1d9eae7bd66a038169d25bed495362335b33 # Parent 879109b7ea8bd35977d2ad1e72c87e8428260ae4 Fix some warnings. diff -r 879109b7ea8b -r 0a9e1d9eae7b src/audacious/output.c --- a/src/audacious/output.c Mon Feb 11 05:35:58 2008 +0100 +++ b/src/audacious/output.c Mon Feb 11 03:57:30 2008 -0600 @@ -255,8 +255,8 @@ static SAD_dither_t *sad_state_from_float = NULL; static float *sad_float_buf = NULL; static void *sad_out_buf = NULL; -static guint sad_float_buf_length = 0; -static guint sad_out_buf_length = 0; +static gsize sad_float_buf_length = 0; +static gsize sad_out_buf_length = 0; static ReplayGainInfo replay_gain_info = { .track_gain = 0.0, .track_peak = 0.0, diff -r 879109b7ea8b -r 0a9e1d9eae7b src/audacious/util.c --- a/src/audacious/util.c Mon Feb 11 05:35:58 2008 +0100 +++ b/src/audacious/util.c Mon Feb 11 03:57:30 2008 -0600 @@ -1064,9 +1064,12 @@ * - double it * * -- asphyx + * + * XXX: what's so smart about this?? seems wasteful and silly. --nenolod */ -void* -smart_realloc(void *ptr, size_t *size) { +gpointer +smart_realloc(gpointer ptr, gsize *size) +{ *size = (size_t)pow(2, ceil(log(*size) / log(2)) + 1); if (ptr != NULL) free(ptr); ptr = malloc(*size); diff -r 879109b7ea8b -r 0a9e1d9eae7b src/audacious/util.h --- a/src/audacious/util.h Mon Feb 11 05:35:58 2008 +0100 +++ b/src/audacious/util.h Mon Feb 11 03:57:30 2008 -0600 @@ -108,7 +108,7 @@ SAD_sample_format sadfmt_from_afmt(AFormat fmt); /* minimizes number of realloc's */ -void* smart_realloc(void *ptr, size_t *size); +gpointer smart_realloc(gpointer ptr, gsize *size); G_END_DECLS