Resolve MSVC errors and warnings with refactor

This commit is contained in:
Paul Hollinsky
2018-10-22 12:19:33 -04:00
parent 8e6b0d0b0e
commit 9675bb81f7
22 changed files with 36 additions and 9 deletions
+7
View File
@@ -55,6 +55,10 @@ private:
} timestamp;
};
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable : 4201) // nameless struct/union
#endif
union CoreMiniStatusBits_t {
struct {
unsigned just_reset : 1;
@@ -75,6 +79,9 @@ private:
};
uint32_t dword;
};
#ifdef _MSC_VER
#pragma warning(pop)
#endif
struct HardwareResetStatusPacket {
uint16_t main_loop_time_25ns;
-4
View File
@@ -11,8 +11,6 @@
#include <vector>
#include <memory>
#pragma pack(push, 1)
namespace icsneo {
class Encoder {
@@ -29,6 +27,4 @@ private:
}
#pragma pack(pop)
#endif
@@ -6,6 +6,10 @@
#pragma pack(push, 1)
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable : 4201) // nameless struct/union
#endif
typedef union {
struct {
uint32_t globalError : 1;
@@ -91,6 +95,9 @@ typedef union {
};
uint32_t statusBitfield[4];
} neomessage_statusbitfield_t;
#ifdef _MSC_VER
#pragma warning(pop)
#endif
typedef struct {
neomessage_statusbitfield_t status;