mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
Resolve Linux build issues and warnings
This commit is contained in:
@@ -102,6 +102,7 @@ typedef struct {
|
||||
uint8_t type;
|
||||
uint8_t reserved[9];
|
||||
} neomessage_t;
|
||||
// Any time you add another neomessage_*_t type, make sure to add it to the static_asserts below!
|
||||
|
||||
typedef struct {
|
||||
neomessage_statusbitfield_t status;
|
||||
@@ -113,13 +114,14 @@ typedef struct {
|
||||
uint8_t type;
|
||||
char reserved[9];
|
||||
} neomessage_can_t;
|
||||
static_assert(sizeof(neomessage_can_t) == sizeof(neomessage_t), "All types of neomessage_t must be the same size!");
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include "communication/message/include/message.h"
|
||||
|
||||
static_assert(sizeof(neomessage_can_t) == sizeof(neomessage_t), "All types of neomessage_t must be the same size!");
|
||||
|
||||
namespace icsneo {
|
||||
|
||||
neomessage_t CreateNeoMessage(const Message& message);
|
||||
|
||||
@@ -7,7 +7,7 @@ neomessage_t icsneo::CreateNeoMessage(const Message& message) {
|
||||
// This function is not responsible for storing the message!
|
||||
// Keep the shared_ptr around for the lifetime of the data access
|
||||
const auto type = message.network.getType();
|
||||
neomessage_t neomsg = { 0 }; // Clear out the memory
|
||||
neomessage_t neomsg = {}; // Clear out the memory
|
||||
neomsg.netid = (uint32_t)message.network.getNetID();
|
||||
neomsg.type = (uint8_t)type;
|
||||
neomsg.length = message.data.size();
|
||||
|
||||
Reference in New Issue
Block a user