mirror of
https://github.com/pine64/blisp.git
synced 2026-09-18 21:21:29 +00:00
Fix compiler warnings: Unused function params
We could use C23's `[[maybe_unused]]` but MSVC doesn't support it. So we void cast them with an accompanying "unused" comment.
This commit is contained in:
@@ -16,6 +16,8 @@
|
|||||||
static void drain(struct sp_port* port) {
|
static void drain(struct sp_port* port) {
|
||||||
#if defined(__APPLE__) || defined(__FreeBSD__)
|
#if defined(__APPLE__) || defined(__FreeBSD__)
|
||||||
sp_drain(port);
|
sp_drain(port);
|
||||||
|
#else
|
||||||
|
(void)port; // unused
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
|
|
||||||
int64_t blisp_chip_bl60x_get_eflash_loader(uint8_t clk_type, uint8_t** firmware_buf_ptr)
|
int64_t blisp_chip_bl60x_get_eflash_loader(uint8_t clk_type, uint8_t** firmware_buf_ptr)
|
||||||
{
|
{
|
||||||
|
(void)clk_type; // unused
|
||||||
|
|
||||||
uint8_t* firmware_buf = malloc(sizeof(bl60x_eflash_loader_bin));
|
uint8_t* firmware_buf = malloc(sizeof(bl60x_eflash_loader_bin));
|
||||||
memcpy(firmware_buf, bl60x_eflash_loader_bin, sizeof(bl60x_eflash_loader_bin));
|
memcpy(firmware_buf, bl60x_eflash_loader_bin, sizeof(bl60x_eflash_loader_bin));
|
||||||
*(firmware_buf + 0xE0) = 4; // TODO: 40 MHz clock
|
*(firmware_buf + 0xE0) = 4; // TODO: 40 MHz clock
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
|
|
||||||
int64_t blisp_chip_bl70x_get_eflash_loader(uint8_t clk_type, uint8_t** firmware_buf_ptr)
|
int64_t blisp_chip_bl70x_get_eflash_loader(uint8_t clk_type, uint8_t** firmware_buf_ptr)
|
||||||
{
|
{
|
||||||
|
(void) clk_type; // ununsed
|
||||||
|
|
||||||
uint8_t* firmware_buf = malloc(sizeof(bl70x_eflash_loader_bin));
|
uint8_t* firmware_buf = malloc(sizeof(bl70x_eflash_loader_bin));
|
||||||
memcpy(firmware_buf, bl70x_eflash_loader_bin, sizeof(bl70x_eflash_loader_bin));
|
memcpy(firmware_buf, bl70x_eflash_loader_bin, sizeof(bl70x_eflash_loader_bin));
|
||||||
*(firmware_buf + 0xE0) = 1; // TODO: 32 MHz clock
|
*(firmware_buf + 0xE0) = 1; // TODO: 32 MHz clock
|
||||||
|
|||||||
Reference in New Issue
Block a user