summaryrefslogtreecommitdiffhomepage
path: root/x-plane-plugin/plugin.c
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-10-16 23:44:58 +0200
committerStanislaw Halik <sthalik@misaki.pl>2013-10-17 03:16:11 +0200
commita8a8cfac5f1be7e0cbfadcc2def8aaa0e8d9d9a0 (patch)
treebdbd4ca204fec2009a003d7f9e140706afe38446 /x-plane-plugin/plugin.c
parent3e71e6218557bf14220a23d5afb772c170545cb4 (diff)
all except 3rdparty-maintained stuff pass -Wall -Wextra -pedantic
Signed-off-by: Stanislaw Halik <sthalik@misaki.pl>
Diffstat (limited to 'x-plane-plugin/plugin.c')
-rw-r--r--x-plane-plugin/plugin.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/x-plane-plugin/plugin.c b/x-plane-plugin/plugin.c
index 67dab7ad..38e1e7bf 100644
--- a/x-plane-plugin/plugin.c
+++ b/x-plane-plugin/plugin.c
@@ -40,7 +40,13 @@ static WineSHM* shm_posix = NULL;
static void *view_x, *view_y, *view_z, *view_heading, *view_pitch;
static float offset_x, offset_y, offset_z;
-PortableLockedShm* PortableLockedShm_init(const char *shmName, const char *mutexName, int mapSize)
+#ifdef __GNUC__
+# define OT_UNUSED(varname) varname __attribute__((__unused__))
+#else
+# define OT_UNUSED(varname) varname
+#endif
+
+PortableLockedShm* PortableLockedShm_init(const char *shmName, const char *OT_UNUSED(mutexName), int mapSize)
{
PortableLockedShm* self = malloc(sizeof(PortableLockedShm));
char shm_filename[NAME_MAX];
@@ -83,9 +89,9 @@ static void reinit_offset() {
}
int write_head_position(
- XPLMDrawingPhase inPhase,
- int inIsBefore,
- void * inRefcon)
+ XPLMDrawingPhase OT_UNUSED(inPhase),
+ int OT_UNUSED(inIsBefore),
+ void * OT_UNUSED(inRefcon))
{
if (lck_posix != NULL && shm_posix != NULL) {
PortableLockedShm_lock(lck_posix);
@@ -140,9 +146,9 @@ PLUGIN_API void XPluginDisable ( void ) {
}
PLUGIN_API void XPluginReceiveMessage(
- XPLMPluginID inFromWho,
- int inMessage,
- void * inParam)
+ XPLMPluginID OT_UNUSED(inFromWho),
+ int OT_UNUSED(inMessage),
+ void * OT_UNUSED(inParam))
{
if (inMessage == XPLM_MSG_AIRPORT_LOADED)
reinit_offset();