[realtek-amb] Fix or suppress compilation warnings
This commit is contained in:
@@ -222,9 +222,11 @@ queue.AddLibrary(
|
|||||||
"-Wno-parentheses",
|
"-Wno-parentheses",
|
||||||
"-Wno-implicit-function-declaration",
|
"-Wno-implicit-function-declaration",
|
||||||
"-Wno-misleading-indentation",
|
"-Wno-misleading-indentation",
|
||||||
# TODO remove this; only for example_wlan_fast_connect.c
|
"-Wno-unused-value",
|
||||||
|
# TODO remove this; only for example_wlan_fast_connect.c and at_cmd/*
|
||||||
"-Wno-format-truncation",
|
"-Wno-format-truncation",
|
||||||
"-Wno-return-type",
|
"-Wno-return-type",
|
||||||
|
"-Wno-unused-variable",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -7,4 +7,5 @@
|
|||||||
// this is included only by wifi_simple_config.c
|
// this is included only by wifi_simple_config.c
|
||||||
// which uses lwip_ntohl without parentheses
|
// which uses lwip_ntohl without parentheses
|
||||||
// so the #define from lwip/def.h doesn't work
|
// so the #define from lwip/def.h doesn't work
|
||||||
|
#undef lwip_ntohl
|
||||||
#define lwip_ntohl lwip_htonl
|
#define lwip_ntohl lwip_htonl
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ void hexdump(const uint8_t *buf, size_t len, uint32_t offset, uint8_t width) {
|
|||||||
uint16_t pos = 0;
|
uint16_t pos = 0;
|
||||||
while (pos < len) {
|
while (pos < len) {
|
||||||
// print hex offset
|
// print hex offset
|
||||||
printf("%06x ", offset + pos);
|
printf("%06lx ", offset + pos);
|
||||||
// calculate current line width
|
// calculate current line width
|
||||||
uint8_t lineWidth = MIN(width, len - pos);
|
uint8_t lineWidth = MIN(width, len - pos);
|
||||||
// print hexadecimal representation
|
// print hexadecimal representation
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
/* Copyright (c) Kuba Szczodrzyński 2022-04-28. */
|
/* Copyright (c) Kuba Szczodrzyński 2022-04-28. */
|
||||||
|
|
||||||
#include "lt_logger.h"
|
#include "lt_logger.h"
|
||||||
|
#include <sdk_private.h>
|
||||||
#include <stdarg.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
#if LT_HAS_PRINTF
|
#if LT_HAS_PRINTF
|
||||||
#include <printf/printf.h>
|
#include <printf/printf.h>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ static int read(long offset, uint8_t *buf, size_t size) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int write(long offset, const uint8_t *buf, size_t size) {
|
static int write(long offset, const uint8_t *buf, size_t size) {
|
||||||
return size * flash_stream_write(NULL, offset, size, buf);
|
return size * flash_stream_write(NULL, offset, size, (uint8_t *)buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int erase(long offset, size_t size) {
|
static int erase(long offset, size_t size) {
|
||||||
|
|||||||
@@ -12,10 +12,10 @@
|
|||||||
extern uint32_t UART_Writable(void *UARTx);
|
extern uint32_t UART_Writable(void *UARTx);
|
||||||
extern void UART_CharPut(void *UARTx, uint8_t TxData);
|
extern void UART_CharPut(void *UARTx, uint8_t TxData);
|
||||||
|
|
||||||
static const void *uart_dev[3] = {
|
static void *uart_dev[3] = {
|
||||||
UART0_REG_BASE,
|
(void *)UART0_REG_BASE,
|
||||||
UART1_REG_BASE,
|
(void *)UART1_REG_BASE,
|
||||||
LOG_UART_REG_BASE,
|
(void *)LOG_UART_REG_BASE,
|
||||||
};
|
};
|
||||||
|
|
||||||
uint8_t lt_uart_port = 2;
|
uint8_t lt_uart_port = 2;
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ extern "C" {
|
|||||||
#define boolean boolean_rtl
|
#define boolean boolean_rtl
|
||||||
// fix conflicts with Arduino's PinMode enum
|
// fix conflicts with Arduino's PinMode enum
|
||||||
#define PinMode PinModeRTL
|
#define PinMode PinModeRTL
|
||||||
|
// remove log_printf() if included before sdk_private.h
|
||||||
|
#undef log_printf
|
||||||
|
|
||||||
#include <strproc.h> // define string macros first
|
#include <strproc.h> // define string macros first
|
||||||
#undef isdigit // then remove them, as they conflict
|
#undef isdigit // then remove them, as they conflict
|
||||||
|
|||||||
Reference in New Issue
Block a user