Mercurial > audlegacy
changeset 4278:0a9e1d9eae7b
Fix some warnings.
author | William Pitcock <nenolod@atheme.org> |
---|---|
date | Mon, 11 Feb 2008 03:57:30 -0600 |
parents | 879109b7ea8b |
children | 6c97378391b8 |
files | src/audacious/output.c src/audacious/util.c src/audacious/util.h |
diffstat | 3 files changed, 8 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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,
--- 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);
--- 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