[waffle] [PATCH 5/6] wcore: silence compiler unused-parameter warnings
Emil Velikov
emil.l.velikov at gmail.com
Tue Feb 3 16:55:18 PST 2015
v2: Inline wcore_display_teardown, and silence the warning.
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
Reviewed-by: Chad Versace <chad.versace at intel.com>
---
src/waffle/core/wcore_config.h | 1 +
src/waffle/core/wcore_context.h | 1 +
src/waffle/core/wcore_display.c | 7 -------
src/waffle/core/wcore_display.h | 9 +++++++--
src/waffle/core/wcore_platform.h | 2 ++
src/waffle/core/wcore_window.h | 1 +
6 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/src/waffle/core/wcore_config.h b/src/waffle/core/wcore_config.h
index 7911f56..27534af 100644
--- a/src/waffle/core/wcore_config.h
+++ b/src/waffle/core/wcore_config.h
@@ -73,6 +73,7 @@ wcore_config_init(struct wcore_config *self,
static inline bool
wcore_config_teardown(struct wcore_config *self)
{
+ (void) self;
assert(self);
return true;
}
diff --git a/src/waffle/core/wcore_context.h b/src/waffle/core/wcore_context.h
index fb67e4c..3800113 100644
--- a/src/waffle/core/wcore_context.h
+++ b/src/waffle/core/wcore_context.h
@@ -69,6 +69,7 @@ wcore_context_init(struct wcore_context *self,
static inline bool
wcore_context_teardown(struct wcore_context *self)
{
+ (void) self;
assert(self);
return true;
}
diff --git a/src/waffle/core/wcore_display.c b/src/waffle/core/wcore_display.c
index a47e2c3..2feeeba 100644
--- a/src/waffle/core/wcore_display.c
+++ b/src/waffle/core/wcore_display.c
@@ -52,10 +52,3 @@ wcore_display_init(struct wcore_display *self,
return true;
}
-
-bool
-wcore_display_teardown(struct wcore_display *self)
-{
- assert(self);
- return true;
-}
diff --git a/src/waffle/core/wcore_display.h b/src/waffle/core/wcore_display.h
index 9a0357d..867a574 100644
--- a/src/waffle/core/wcore_display.h
+++ b/src/waffle/core/wcore_display.h
@@ -55,5 +55,10 @@ wcore_display_init(struct wcore_display *self,
struct wcore_platform *platform);
-bool
-wcore_display_teardown(struct wcore_display *self);
+static inline bool
+wcore_display_teardown(struct wcore_display *self)
+{
+ (void) self;
+ assert(self);
+ return true;
+}
diff --git a/src/waffle/core/wcore_platform.h b/src/waffle/core/wcore_platform.h
index 2f9b9f8..780d07a 100644
--- a/src/waffle/core/wcore_platform.h
+++ b/src/waffle/core/wcore_platform.h
@@ -144,6 +144,7 @@ struct wcore_platform {
static inline bool
wcore_platform_init(struct wcore_platform *self)
{
+ (void) self;
assert(self);
return true;
}
@@ -151,6 +152,7 @@ wcore_platform_init(struct wcore_platform *self)
static inline bool
wcore_platform_teardown(struct wcore_platform *self)
{
+ (void) self;
assert(self);
return true;
}
diff --git a/src/waffle/core/wcore_window.h b/src/waffle/core/wcore_window.h
index 20a154b..4161597 100644
--- a/src/waffle/core/wcore_window.h
+++ b/src/waffle/core/wcore_window.h
@@ -62,6 +62,7 @@ wcore_window_init(struct wcore_window *self,
static inline bool
wcore_window_teardown(struct wcore_window *self)
{
+ (void) self;
assert(self);
return true;
}
--
2.1.3
More information about the waffle
mailing list