diff --git a/arch/arm/src/cxd56xx/cxd56_timer.c b/arch/arm/src/cxd56xx/cxd56_timer.c index 43ef8f5885..90e9e70b22 100644 --- a/arch/arm/src/cxd56xx/cxd56_timer.c +++ b/arch/arm/src/cxd56xx/cxd56_timer.c @@ -552,7 +552,8 @@ void cxd56_timer_initialize(const char *devpath, int timer) break; default: - ASSERT(0); + PANIC(); + break; } priv->ops = &g_tmrops; diff --git a/arch/arm/src/imxrt/imxrt_usdhc.c b/arch/arm/src/imxrt/imxrt_usdhc.c index 236ef94462..3d339fd489 100644 --- a/arch/arm/src/imxrt/imxrt_usdhc.c +++ b/arch/arm/src/imxrt/imxrt_usdhc.c @@ -1882,7 +1882,7 @@ static int imxrt_attach(struct sdio_dev_s *dev) } else { - ASSERT(false); + PANIC(); } } diff --git a/arch/arm/src/nrf52/nrf52_radio.c b/arch/arm/src/nrf52/nrf52_radio.c index f400877a5c..1a01ea69df 100644 --- a/arch/arm/src/nrf52/nrf52_radio.c +++ b/arch/arm/src/nrf52/nrf52_radio.c @@ -1032,7 +1032,7 @@ static int nrf52_radio_isr(int irq, void *context, void *arg) default: { - ASSERT(0); + PANIC(); break; } } diff --git a/arch/arm/src/sama5/sam_sdmmc.c b/arch/arm/src/sama5/sam_sdmmc.c index aa6b2bf74f..5147a0cce2 100644 --- a/arch/arm/src/sama5/sam_sdmmc.c +++ b/arch/arm/src/sama5/sam_sdmmc.c @@ -1997,7 +1997,7 @@ static int sam_attach(struct sdio_dev_s *dev) } else { - ASSERT(false); + PANIC(); } } diff --git a/arch/arm/src/stm32h7/stm32_dma.c b/arch/arm/src/stm32h7/stm32_dma.c index 2c0fdbae10..42ae90b815 100644 --- a/arch/arm/src/stm32h7/stm32_dma.c +++ b/arch/arm/src/stm32h7/stm32_dma.c @@ -2246,7 +2246,7 @@ void weak_function arm_dma_initialize(void) default: { - ASSERT(0); + PANIC(); break; } } diff --git a/arch/risc-v/src/c906/c906_irq.c b/arch/risc-v/src/c906/c906_irq.c index 65f854553d..980959f39f 100644 --- a/arch/risc-v/src/c906/c906_irq.c +++ b/arch/risc-v/src/c906/c906_irq.c @@ -132,7 +132,7 @@ void up_disable_irq(int irq) } else { - ASSERT(false); + PANIC(); } } } @@ -174,7 +174,7 @@ void up_enable_irq(int irq) } else { - ASSERT(false); + PANIC(); } } } diff --git a/arch/risc-v/src/esp32c3/esp32c3_rtc.c b/arch/risc-v/src/esp32c3/esp32c3_rtc.c index d921df536d..af881e75f7 100644 --- a/arch/risc-v/src/esp32c3/esp32c3_rtc.c +++ b/arch/risc-v/src/esp32c3/esp32c3_rtc.c @@ -2958,7 +2958,7 @@ void IRAM_ATTR esp32c3_rtc_clk_cpu_freq_get_config( } else { - ASSERT(0); + PANIC(); } } break; @@ -2973,7 +2973,8 @@ void IRAM_ATTR esp32c3_rtc_clk_cpu_freq_get_config( break; default: - ASSERT(0); + PANIC(); + break; } *out_config = (struct esp32c3_cpu_freq_config_s) diff --git a/arch/risc-v/src/fe310/fe310_clockconfig.c b/arch/risc-v/src/fe310/fe310_clockconfig.c index d5cf551235..039a2cf265 100644 --- a/arch/risc-v/src/fe310/fe310_clockconfig.c +++ b/arch/risc-v/src/fe310/fe310_clockconfig.c @@ -78,7 +78,7 @@ uint32_t fe310_get_hfclk(void) /* TODO: HFROSC */ - ASSERT(false); + PANIC(); out: return freq; diff --git a/arch/risc-v/src/fe310/fe310_irq.c b/arch/risc-v/src/fe310/fe310_irq.c index a9f7dc6686..1ab7ab4d22 100644 --- a/arch/risc-v/src/fe310/fe310_irq.c +++ b/arch/risc-v/src/fe310/fe310_irq.c @@ -119,7 +119,7 @@ void up_disable_irq(int irq) } else { - ASSERT(false); + PANIC(); } } } @@ -155,7 +155,7 @@ void up_enable_irq(int irq) } else { - ASSERT(false); + PANIC(); } } } diff --git a/arch/risc-v/src/k210/k210_irq.c b/arch/risc-v/src/k210/k210_irq.c index 08dd572bd9..c29c1dfc8f 100644 --- a/arch/risc-v/src/k210/k210_irq.c +++ b/arch/risc-v/src/k210/k210_irq.c @@ -137,7 +137,7 @@ void up_disable_irq(int irq) } else { - ASSERT(false); + PANIC(); } } } @@ -179,7 +179,7 @@ void up_enable_irq(int irq) } else { - ASSERT(false); + PANIC(); } } } diff --git a/arch/risc-v/src/litex/litex_irq.c b/arch/risc-v/src/litex/litex_irq.c index 2d8cfd5c0b..d792161ea4 100644 --- a/arch/risc-v/src/litex/litex_irq.c +++ b/arch/risc-v/src/litex/litex_irq.c @@ -114,7 +114,7 @@ void up_disable_irq(int irq) } else { - ASSERT(false); + PANIC(); } } } @@ -159,7 +159,7 @@ void up_enable_irq(int irq) } else { - ASSERT(false); + PANIC(); } } } diff --git a/arch/risc-v/src/mpfs/mpfs_irq.c b/arch/risc-v/src/mpfs/mpfs_irq.c index 7c6fd69343..a7550c5d73 100644 --- a/arch/risc-v/src/mpfs/mpfs_irq.c +++ b/arch/risc-v/src/mpfs/mpfs_irq.c @@ -138,7 +138,7 @@ void up_disable_irq(int irq) } else { - ASSERT(false); + PANIC(); } } } @@ -181,7 +181,7 @@ void up_enable_irq(int irq) } else { - ASSERT(false); + PANIC(); } } } diff --git a/arch/risc-v/src/qemu-rv/qemu_rv_irq.c b/arch/risc-v/src/qemu-rv/qemu_rv_irq.c index 2033974305..5c0badb1f7 100644 --- a/arch/risc-v/src/qemu-rv/qemu_rv_irq.c +++ b/arch/risc-v/src/qemu-rv/qemu_rv_irq.c @@ -131,7 +131,7 @@ void up_disable_irq(int irq) } else { - ASSERT(false); + PANIC(); } } } @@ -181,7 +181,7 @@ void up_enable_irq(int irq) } else { - ASSERT(false); + PANIC(); } } } diff --git a/drivers/wireless/gs2200m.c b/drivers/wireless/gs2200m.c index 10ca3b5988..060e3a83ad 100644 --- a/drivers/wireless/gs2200m.c +++ b/drivers/wireless/gs2200m.c @@ -274,7 +274,8 @@ static enum pkt_type_e _spi_err_to_pkt_type(enum spi_status_e s) default: r = TYPE_UNMATCH; - ASSERT(false); + PANIC(); + break; } return r; @@ -303,7 +304,7 @@ static uint8_t _cid_to_uint8(char c) else { ret = 0xff; - ASSERT(false); + PANIC(); } return ret; @@ -1191,7 +1192,7 @@ static void _parse_pkt_in_s2(FAR struct pkt_ctx_s *pkt_ctx, else { wlerr("** %c not supported\n", c); - ASSERT(false); + PANIC(); } } @@ -1352,7 +1353,7 @@ static enum pkt_type_e _parse_pkt(FAR uint8_t *p, uint16_t len, break; default: - ASSERT(false); + PANIC(); break; } } @@ -1882,7 +1883,7 @@ gs2200m_create_clnt(FAR struct gs2200m_dev_s *dev, } else { - ASSERT(false); + PANIC(); } /* Initialize pkt_dat and send */ @@ -2352,8 +2353,9 @@ static int gs2200m_ioctl_connect(FAR struct gs2200m_dev_s *dev, default: wlerr("+++ error: type=%d\n", type); - ASSERT(false); + PANIC(); ret = -EINVAL; + break; } wlinfo("++ end: cid=%c (type=%d,ret=%d)\n", cid, type, ret); diff --git a/drivers/wireless/lpwan/sx127x/sx127x.c b/drivers/wireless/lpwan/sx127x/sx127x.c index 35ee13b4a6..1915ed0db0 100644 --- a/drivers/wireless/lpwan/sx127x/sx127x.c +++ b/drivers/wireless/lpwan/sx127x/sx127x.c @@ -1121,7 +1121,7 @@ static int sx127x_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case SX127XIOC_SYNCWORDSET: { - ASSERT(0); + PANIC(); sx127x_syncword_set(dev, NULL, 0); break; } @@ -1130,7 +1130,7 @@ static int sx127x_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case SX127XIOC_SYNCWORDGET: { - ASSERT(0); + PANIC(); sx127x_syncword_get(dev, NULL, 0); break; } diff --git a/libs/libc/machine/risc-v/arch_elf.c b/libs/libc/machine/risc-v/arch_elf.c index c95c9b381b..d2e8475f03 100644 --- a/libs/libc/machine/risc-v/arch_elf.c +++ b/libs/libc/machine/risc-v/arch_elf.c @@ -563,7 +563,7 @@ int up_relocateadd(const Elf_Rela *rel, const Elf_Sym *sym, default: berr("ERROR: Unsupported relocation: %ld\n", ARCH_ELF_RELTYPE(rel->r_info)); - ASSERT(false); + PANIC(); return -EINVAL; }