Skip to content

GDB handler function prototype mismatch #6299

Closed
@earlephilhower

Description

@earlephilhower

GCC9.1 warns about the following callback function which expects a (irq saved registers?) frame as one of the parameters (but according to the ETS prototype, that's not actually passed back).

Everything seems to work, so we need to figure out if the frame param can be removed (i.e. has no effect on behavior) or the ETS header needs to be updated before 3.0

In file included from /home/earle/Arduino/hardware/esp8266com/esp8266/libraries/GDBStub/src/internal/gdbstub.c:13:
/home/earle/Arduino/hardware/esp8266com/esp8266/libraries/GDBStub/src/internal/gdbstub.c: In function 'install_uart_hdlr':
/home/earle/Arduino/hardware/esp8266com/esp8266/tools/sdk/include/ets_sys.h:144:35: warning: cast between incompatible function types from 'void (*)(void *, void *)' to 'void (*)(void *)' [-Wcast-function-type]
  144 |     ets_isr_attach(ETS_UART_INUM, (int_handler_t)(func), (void *)(arg))
      |                                   ^
/home/earle/Arduino/hardware/esp8266com/esp8266/libraries/GDBStub/src/internal/gdbstub.c:875:2: note: in expansion of macro 'ETS_UART_INTR_ATTACH'
  875 |  ETS_UART_INTR_ATTACH(gdbstub_uart_hdlr, NULL);
      |  ^~~~~~~~~~~~~~~~~~~~

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions