mynewt-core icon indicating copy to clipboard operation
mynewt-core copied to clipboard

MyNewt core does not compile (warnings, errors) if NDEBUG is defined

Open brianwyld opened this issue 5 years ago • 0 comments

If mynewt is compiled with -DNDEBUG, multiple files have errors or warnings. These are mostly simple cases of unused variables used by assert() (which is a void statement in the NDEBUG case).

hw/bus/src/bus.c : bus_node_unlock() - unused variable 'err' hw/hal/src/hal_flash.c : hal_flash_erase() - unused variable 'rc' hw/mcu/stm/stm32_common/src/hal_gpio.c : MYNEWT_VAL macro undefined (as does not include mynewt.h explicitly) hw/mcu/stm/stm32_common/src/hal_uart.c : MYNEWT_VAL macro undefined for same reason hw/mcu/stm/stm32_common/src/hal_spi.c : stm32_resolve_spi_irq() : no value returned (as falls thru default case) stm32_resolve_spi_irq_handler() : no value returned (as falls thru default case) kernel/os/src/os.c : unused variables 'rc' or 'err' in os_init_idle_task()/os_init()/os_start()/os_pkg_init() kernel/os/src/os_heap.c : unused variable 'rc' in os_malloc_lock()/os_malloc_unlock() kernel/os/src/os_sched.c : unused variable 'top' in os_sched_ctx_sw_hook()

brianwyld avatar Dec 11 '19 10:12 brianwyld