Commit e7cad33853d24c0df1f4fb566485a866a8f0e40a
1 parent
575b5dc4
size_t fix (malc)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1617 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
2 changed files
with
3 additions
and
2 deletions
audio/audio_template.h
@@ -131,6 +131,7 @@ static HW *glue (audio_pcm_hw_find_any_passive_, TYPE) (AudioState *s) | @@ -131,6 +131,7 @@ static HW *glue (audio_pcm_hw_find_any_passive_, TYPE) (AudioState *s) | ||
131 | if (!hw) { | 131 | if (!hw) { |
132 | dolog ("Can not allocate voice `%s' size %d\n", | 132 | dolog ("Can not allocate voice `%s' size %d\n", |
133 | drv->name, glue (drv->voice_size_, TYPE)); | 133 | drv->name, glue (drv->voice_size_, TYPE)); |
134 | + return NULL; | ||
134 | } | 135 | } |
135 | 136 | ||
136 | LIST_INSERT_HEAD (&s->glue (hw_head_, TYPE), hw, entries); | 137 | LIST_INSERT_HEAD (&s->glue (hw_head_, TYPE), hw, entries); |
@@ -221,7 +222,7 @@ static SW *glue (audio_pcm_create_voice_pair_, TYPE) ( | @@ -221,7 +222,7 @@ static SW *glue (audio_pcm_create_voice_pair_, TYPE) ( | ||
221 | 222 | ||
222 | sw = audio_calloc (AUDIO_FUNC, 1, sizeof (*sw)); | 223 | sw = audio_calloc (AUDIO_FUNC, 1, sizeof (*sw)); |
223 | if (!sw) { | 224 | if (!sw) { |
224 | - dolog ("Could not allocate soft voice `%s' (%d bytes)\n", | 225 | + dolog ("Could not allocate soft voice `%s' (%zu bytes)\n", |
225 | sw_name ? sw_name : "unknown", sizeof (*sw)); | 226 | sw_name ? sw_name : "unknown", sizeof (*sw)); |
226 | goto err1; | 227 | goto err1; |
227 | } | 228 | } |
audio/mixeng.c
@@ -243,7 +243,7 @@ void *st_rate_start (int inrate, int outrate) | @@ -243,7 +243,7 @@ void *st_rate_start (int inrate, int outrate) | ||
243 | struct rate *rate = audio_calloc (AUDIO_FUNC, 1, sizeof (*rate)); | 243 | struct rate *rate = audio_calloc (AUDIO_FUNC, 1, sizeof (*rate)); |
244 | 244 | ||
245 | if (!rate) { | 245 | if (!rate) { |
246 | - dolog ("Could not allocate resampler (%d bytes)\n", sizeof (*rate)); | 246 | + dolog ("Could not allocate resampler (%zu bytes)\n", sizeof (*rate)); |
247 | return NULL; | 247 | return NULL; |
248 | } | 248 | } |
249 | 249 |