Fix unused variable warnings
This commit is contained in:
parent
fa8fc317f3
commit
1d01548627
2 changed files with 4 additions and 4 deletions
|
@ -46,9 +46,9 @@
|
||||||
|
|
||||||
// endianness conversion
|
// endianness conversion
|
||||||
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||||
#define convert_from_le16(x)
|
#define convert_from_le16(x) UNUSED(x)
|
||||||
#define convert_from_le32(x)
|
#define convert_from_le32(x) UNUSED(x)
|
||||||
#define convert_from_le64(x)
|
#define convert_from_le64(x) UNUSED(x)
|
||||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||||
static inline void convert_from_le16(void * value) {
|
static inline void convert_from_le16(void * value) {
|
||||||
*((uint16_t*)value) = le16toh(*((uint16_t*)value));
|
*((uint16_t*)value) = le16toh(*((uint16_t*)value));
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
// endianness conversion
|
// endianness conversion
|
||||||
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||||
#define convert_from_le(x)
|
#define convert_from_le(x) (void)(x)
|
||||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue