Commit 11ac2200 authored by robertfoss's avatar robertfoss

Silenced GCC warnings

parent 7d07f8a2
......@@ -15,8 +15,10 @@ int cmd_peek(int argc, char **argv)
offset = strtoul(argv[0], NULL, 0);
#pragma GCC diagnostic ignored "-Wformat"
printf("Value at 0x%08x: ", offset);
printf("0x%08x\n", *((volatile uint32_t *)offset));
#pragma GCC diagnostic pop
return 0;
}
......@@ -33,8 +35,10 @@ int cmd_poke(int argc, char **argv)
offset = strtoul(argv[0], NULL, 0);
val = strtoul(argv[1], NULL, 0);
#pragma GCC diagnostic ignored "-Wformat"
printf("Setting value at 0x%08x to 0x%08x: ", offset, val);
writel(val, offset);
#pragma GCC diagnostic pop
writel(val, offset);
printf("Ok\n");
return 0;
......
......@@ -1173,7 +1173,10 @@ static int fernvale_write_stage3(int serfd, int binfd)
}
static void cmd_begin(const char *msg) {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat-security"
printf(msg);
#pragma GCC diagnostic pop
printf("... ");
fflush(stdout);
}
......
......@@ -130,7 +130,9 @@ void irq_dispatch(void)
printf("Dispatching IRQs...\n");
reg = IRQ_BASE + IRQ_STATUS_OFF;
val = readl(reg);
#pragma GCC diagnostic ignored "-Wformat"
printf("Lower Mask: 0x%08x\n", val);
#pragma GCC diagnostic pop
for (i = 0; i < 32; i++)
if (val & (1 << i))
......@@ -138,7 +140,10 @@ void irq_dispatch(void)
reg += IRQ_BASE + IRQ_STATUS_OFF + 4;
val = readl(reg);
printf("Upper Mask: 0x%08x\n", val);
#pragma GCC diagnostic ignored "-Wformat"
printf("Upper Mask: 0x%08x\n", val);
#pragma GCC diagnostic pop
for (i = 0; i < (__irq_max__ - 32); i++)
if (val & (1 << i))
irq_dispatch_one(32 + i);
......
......@@ -29,11 +29,11 @@ static void lcd_cmd_slot(uint16_t cmd, uint8_t slot)
{
writel(cmd | 0x800000, LCD_CMD_LIST_ADDR + (slot * 4));
}
#pragma GCC diagnostic ignored "-Wunused-function"
static void lcd_dat_slot(uint16_t dat, uint8_t slot)
{
writel(dat, LCD_CMD_LIST_ADDR + (slot * 4));
}
static void lcd_setup_gpio(void)
{
/* LPCE0, LPTE0, LPRSTB */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment