Resolve some compiler warnings
This commit is contained in:
@@ -7,9 +7,9 @@ uint8_t readUInt8(config_buffer_t *buffer) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint16_t readUInt16(config_buffer_t *buffer) {
|
uint16_t readUInt16(config_buffer_t *buffer) {
|
||||||
uint16_t uInt16 = *(uint16_t *)(buffer->buffer + buffer->offset);
|
uint16_t uInt16 = readUInt8(buffer);
|
||||||
|
|
||||||
buffer->offset += 2;
|
uInt16 |= readUInt8(buffer) << 8;
|
||||||
return uInt16;
|
return uInt16;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ const char *readString(config_buffer_t *buffer, uint16_t *len) {
|
|||||||
const char *string;
|
const char *string;
|
||||||
|
|
||||||
*len = readCompactLength(buffer);
|
*len = readCompactLength(buffer);
|
||||||
string = buffer->buffer + buffer->offset;
|
string = (const char *)(buffer->buffer + buffer->offset);
|
||||||
buffer->offset += *len;
|
buffer->offset += *len;
|
||||||
return string;
|
return string;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
// Typedefs:
|
// Typedefs:
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint8_t const buffer[EEPROM_SIZE];
|
uint8_t buffer[EEPROM_SIZE];
|
||||||
uint16_t offset;
|
uint16_t offset;
|
||||||
} config_buffer_t;
|
} config_buffer_t;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user