Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
brianwyld opened this issue Dec 11, 2019 · 0 comments
Open

Comments

@brianwyld
Copy link

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()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant