From 4425a99e305e9bd4a64a46ed7ce91396619e090e Mon Sep 17 00:00:00 2001 From: David 'Digit' Turner Date: Thu, 30 Oct 2014 15:35:26 +0100 Subject: emulator/opengl: Remove compiler warnings. This patch ensures that the auto-generated client_context.h headers do not generate compiler warnings in the setError() function. + Remove tiny warning for NativeLinuxSubWindow.cpp Change-Id: Ibab92ab3332fd284589435732b52c011ae21c15f --- emulator/opengl/host/libs/libOpenglRender/NativeLinuxSubWindow.cpp | 2 ++ emulator/opengl/host/tools/emugen/ApiGen.cpp | 2 +- .../host/tools/emugen/tests/t.001/expected/encoder/foo_client_context.h | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/emulator/opengl/host/libs/libOpenglRender/NativeLinuxSubWindow.cpp b/emulator/opengl/host/libs/libOpenglRender/NativeLinuxSubWindow.cpp index ff335df..5f71849 100644 --- a/emulator/opengl/host/libs/libOpenglRender/NativeLinuxSubWindow.cpp +++ b/emulator/opengl/host/libs/libOpenglRender/NativeLinuxSubWindow.cpp @@ -15,6 +15,8 @@ */ #include "NativeSubWindow.h" +#include + static Bool WaitForMapNotify(Display *d, XEvent *e, char *arg) { if (e->type == MapNotify && e->xmap.window == (Window)arg) { diff --git a/emulator/opengl/host/tools/emugen/ApiGen.cpp b/emulator/opengl/host/tools/emugen/ApiGen.cpp index 5ffe38f..b3e4c34 100644 --- a/emulator/opengl/host/tools/emugen/ApiGen.cpp +++ b/emulator/opengl/host/tools/emugen/ApiGen.cpp @@ -171,7 +171,7 @@ int ApiGen::genContext(const std::string & filename, SideType side) //client site set error virtual func if (side == CLIENT_SIDE) { - fprintf(fp, "\tvirtual void setError(unsigned int error){};\n"); + fprintf(fp, "\tvirtual void setError(unsigned int error){ (void)error; };\n"); fprintf(fp, "\tvirtual unsigned int getError(){ return 0; };\n"); } diff --git a/emulator/opengl/host/tools/emugen/tests/t.001/expected/encoder/foo_client_context.h b/emulator/opengl/host/tools/emugen/tests/t.001/expected/encoder/foo_client_context.h index c4e44ad..bf98845 100644 --- a/emulator/opengl/host/tools/emugen/tests/t.001/expected/encoder/foo_client_context.h +++ b/emulator/opengl/host/tools/emugen/tests/t.001/expected/encoder/foo_client_context.h @@ -16,7 +16,7 @@ struct foo_client_context_t { typedef foo_client_context_t *CONTEXT_ACCESSOR_TYPE(void); static void setContextAccessor(CONTEXT_ACCESSOR_TYPE *f); int initDispatchByName( void *(*getProc)(const char *name, void *userData), void *userData); - virtual void setError(unsigned int error){}; + virtual void setError(unsigned int error){ (void)error; }; virtual unsigned int getError(){ return 0; }; }; -- cgit v1.1