From 4887842c925f304dc862bdd5810f27cdd2eaedcb Mon Sep 17 00:00:00 2001 From: Mark Salyzyn Date: Thu, 22 May 2014 16:08:52 -0700 Subject: include: cleanup for -Wsystem-header - warnings as errors, or errors introduced when -Wsystem-header was experimentally introduced. Change-Id: Ia8f5b3c1c1096e191741223d52526aa48c7f1cc4 --- include/system/audio.h | 8 ++++++++ include/system/window.h | 16 ++++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) (limited to 'include/system') diff --git a/include/system/audio.h b/include/system/audio.h index f36befb..8838e71 100644 --- a/include/system/audio.h +++ b/include/system/audio.h @@ -434,6 +434,14 @@ typedef struct { static const audio_offload_info_t AUDIO_INFO_INITIALIZER = { version: AUDIO_OFFLOAD_INFO_VERSION_CURRENT, size: sizeof(audio_offload_info_t), + sample_rate: 0, + channel_mask: 0, + format: AUDIO_FORMAT_DEFAULT, + stream_type: AUDIO_STREAM_VOICE_CALL, + bit_rate: 0, + duration_us: 0, + has_video: false, + is_streaming: false }; static inline bool audio_is_output_device(audio_devices_t device) diff --git a/include/system/window.h b/include/system/window.h index 588f9c6..cfb4bee 100644 --- a/include/system/window.h +++ b/include/system/window.h @@ -26,6 +26,10 @@ #include #include +#ifndef __unused +#define __unused __attribute__((__unused__)) +#endif + __BEGIN_DECLS /*****************************************************************************/ @@ -89,10 +93,10 @@ typedef struct ANativeWindowBuffer // Implement the methods that sp expects so that it // can be used to automatically refcount ANativeWindowBuffer's. - void incStrong(const void* id) const { + void incStrong(const void* /*id*/) const { common.incRef(const_cast(&common)); } - void decStrong(const void* id) const { + void decStrong(const void* /*id*/) const { common.decRef(const_cast(&common)); } #endif @@ -352,10 +356,10 @@ struct ANativeWindow /* Implement the methods that sp expects so that it can be used to automatically refcount ANativeWindow's. */ - void incStrong(const void* id) const { + void incStrong(const void* /*id*/) const { common.incRef(const_cast(&common)); } - void decStrong(const void* id) const { + void decStrong(const void* /*id*/) const { common.decRef(const_cast(&common)); } #endif @@ -603,13 +607,13 @@ static inline int native_window_set_usage( /* deprecated. Always returns 0. Don't call. */ static inline int native_window_connect( - struct ANativeWindow* window, int api) { + struct ANativeWindow* window __unused, int api __unused) { return 0; } /* deprecated. Always returns 0. Don't call. */ static inline int native_window_disconnect( - struct ANativeWindow* window, int api) { + struct ANativeWindow* window __unused, int api __unused) { return 0; } -- cgit v1.1