From fdf771928db54b511f310d5a1d8b22cebeb92334 Mon Sep 17 00:00:00 2001 From: Paul Adenot Date: Mon, 24 Mar 2014 10:58:23 +0100 Subject: [PATCH] Bug 986793 - Fix warnings in cubeb_audiotrack.c, and allow mixed declaration and code in cubeb_opensl.c. r=cpeterson --HG-- extra : rebase_source : 91856a5c76063be3d6c180abe34cda5cee9f3d71 --- media/libcubeb/src/cubeb_audiotrack.c | 4 ++-- media/libcubeb/src/cubeb_opensl.c | 2 +- media/libcubeb/src/moz.build | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/media/libcubeb/src/cubeb_audiotrack.c b/media/libcubeb/src/cubeb_audiotrack.c index 33c337845f8b..a221906b6389 100644 --- a/media/libcubeb/src/cubeb_audiotrack.c +++ b/media/libcubeb/src/cubeb_audiotrack.c @@ -314,7 +314,7 @@ audiotrack_get_preferred_sample_rate(cubeb * ctx, uint32_t * rate) { status_t rv; - rv = ctx->klass.get_output_samplingrate(rate, 3 /* MUSIC */); + rv = ctx->klass.get_output_samplingrate((int32_t *)rate, 3 /* MUSIC */); return rv == 0 ? CUBEB_OK : CUBEB_ERROR; } @@ -338,7 +338,7 @@ audiotrack_stream_init(cubeb * ctx, cubeb_stream ** stream, char const * stream_ { cubeb_stream * stm; int32_t channels; - int32_t min_frame_count; + uint32_t min_frame_count; assert(ctx && stream); diff --git a/media/libcubeb/src/cubeb_opensl.c b/media/libcubeb/src/cubeb_opensl.c index c580aa766a31..3d403ec64671 100644 --- a/media/libcubeb/src/cubeb_opensl.c +++ b/media/libcubeb/src/cubeb_opensl.c @@ -295,7 +295,7 @@ opensl_get_min_latency(cubeb * ctx, cubeb_stream_params params, uint32_t * laten int rv; void * libmedia; size_t (*get_primary_output_frame_count)(void); - int (*get_output_frame_count)(int * frameCount, int streamType); + int (*get_output_frame_count)(size_t * frameCount, int streamType); uint32_t primary_sampling_rate; size_t primary_buffer_size; diff --git a/media/libcubeb/src/moz.build b/media/libcubeb/src/moz.build index 507360b84fda..d4d540bb0054 100644 --- a/media/libcubeb/src/moz.build +++ b/media/libcubeb/src/moz.build @@ -43,9 +43,8 @@ if CONFIG['OS_TARGET'] == 'WINNT': DEFINES['USE_WASAPI'] = True if CONFIG['OS_TARGET'] == 'Android': - SOURCES += [ - 'cubeb_opensl.c', - ] + SOURCES += ['cubeb_opensl.c'] + SOURCES['cubeb_opensl.c'].flags += ['-Wno-declaration-after-statement'] DEFINES['USE_OPENSL'] = True if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk': SOURCES += [