summaryrefslogtreecommitdiffhomepage
path: root/tracker-wii/wiiyourself/wiimote.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-10-25 03:38:09 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-10-25 03:54:09 +0200
commit25b7bf6a9750f92bd75850740002d32dcf08470e (patch)
tree314e994452a3b56af7b9a9d7465e9f8c92cad791 /tracker-wii/wiiyourself/wiimote.h
parent0a1a0e9df00f37a210b67a11cf8f99550cafeeaf (diff)
tracker/wii: fix for mingw-w64
The module loses auto-pairing functionality, but it's at least useful to see GCC warnings. I don't intend to use GCC for actually running the module. Fix some warnings emitted by GCC, such as - memset(3) of non-POD struct - depending on "new T[0]" to return a null pointer - dependence on MSVC-specific pragmas for external libraries - lack of header guards - unintended usage of trigraph syntax Disable some GCC warnings for the "wiiyourself" library. It's not possible to patch it up, the code quality is that awful. Disable the builtin debug functionality since it depends on non-standard __VA_OPT__ (due in C++20). It's not possible to disable the warning emitted on the __VA_ARGS__ usage in GCC.
Diffstat (limited to 'tracker-wii/wiiyourself/wiimote.h')
-rw-r--r--tracker-wii/wiiyourself/wiimote.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/tracker-wii/wiiyourself/wiimote.h b/tracker-wii/wiiyourself/wiimote.h
index 3588b7c7..dac949c7 100644
--- a/tracker-wii/wiiyourself/wiimote.h
+++ b/tracker-wii/wiiyourself/wiimote.h
@@ -10,15 +10,15 @@
#pragma once
+#include "warns-begin.hpp"
+
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <tchar.h> // auto Unicode/Ansi support
#include <queue> // for HID write method
#include <list> // for state recording
-#ifndef QWORD
- typedef unsigned __int64 QWORD;
-#endif
+typedef unsigned __int64 QWORD;
#ifdef _MSC_VER // VC-specific: _DEBUG build only _ASSERT() sanity checks
# include <crtdbg.h>
@@ -181,7 +181,7 @@ class wiimote : public wiimote_state
// get the frequency from speaker_freq enum
static const unsigned FreqLookup [TOTAL_FREQUENCIES];
- static const unsigned GetFreqLookup (unsigned index)
+ static unsigned GetFreqLookup(unsigned index)
{
_ASSERT(index < TOTAL_FREQUENCIES);
if(index >= TOTAL_FREQUENCIES)
@@ -486,3 +486,5 @@ volatile int MotionPlusDetectCount; // waiting for the result
unsigned ExtTriggerFlags;// extension changes "
} Recording;
};
+
+#include "warns-end.hpp"