Skip to content

Commit 33fee67

Browse files
Remove gdb stub warnings w/a pragma
1 parent 83f308e commit 33fee67

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cores/esp8266/gdb_hooks.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ static bool ICACHE_RAM_ATTR __gdb_no_op()
3131
return false;
3232
}
3333

34+
// To save space, don't create a dummy no-op for each GCC, just point to the no-op
35+
// Need to turn off GCC's checking of parameter types or we'll get many warnings
36+
#pragma GCC diagnostic push
37+
#pragma GCC diagnostic ignored "-Wattribute-alias"
38+
#pragma GCC diagnostic ignored "-Wmissing-attributes"
3439
void gdb_init(void) __attribute__ ((weak, alias("__gdb_no_op")));
3540
void gdb_do_break(void) __attribute__ ((weak, alias("__gdb_no_op")));
3641
bool gdb_present(void) __attribute__ ((weak, alias("__gdb_no_op")));
@@ -40,5 +45,6 @@ bool gdbstub_has_uart_isr_control(void) __attribute__ ((weak, alias("__gdb_no_op
4045
void gdbstub_set_uart_isr_callback(void (*func)(void*, uint8_t), void* arg) __attribute__ ((weak, alias("__gdb_no_op")));
4146
void gdbstub_write_char(char c) __attribute__ ((weak, alias("__gdb_no_op")));
4247
void gdbstub_write(const char* buf, size_t size) __attribute__ ((weak, alias("__gdb_no_op")));
48+
#pragma GCC diagnostic pop
4349

4450
};

0 commit comments

Comments
 (0)