Zephyr: Compiler warning in soc/xtensa/esp32/include/_soc_inthandlers.h

Created on 24 Oct 2018  路  3Comments  路  Source: zephyrproject-rtos/zephyr

Commit: 7cea94942c35bb65a8c219b69ec2270c0fedd6f4

Log:

In file included from /home/kspoorth/work/forked_zephyr/arch/xtensa/core/xtensa-asm2.c:14:0:
/home/kspoorth/work/forked_zephyr/soc/xtensa/esp32/include/_soc_inthandlers.h: In function '_xtensa_handle_one_int0':
/home/kspoorth/work/forked_zephyr/soc/xtensa/esp32/include/_soc_inthandlers.h:363:1: warning: label 'handle_irq' defined but not used [-Wunused-label]
 handle_irq:
 ^
/home/kspoorth/work/forked_zephyr/soc/xtensa/esp32/include/_soc_inthandlers.h: In function '_xtensa_handle_one_int6':
/home/kspoorth/work/forked_zephyr/soc/xtensa/esp32/include/_soc_inthandlers.h:373:1: warning: label 'handle_irq' defined but not used [-Wunused-label]
 handle_irq:
 ^

It is good to get rid of this as it would be an issue while building with compiler warnings being treated as errors.

Build System Xtensa bug ESP32

Most helpful comment

@nniranjhana This file has been auto-generated. I didn't bother special-casing it because the compiler would just remove it with dead-code elimination, but for some reason, I couldn't see those warnings on my machine. I'll update the script to not generate the label and anything after that.

All 3 comments

This is rather a priority since many tests enabled on ESP32 are failing on build now.

This is the code causing the issue -

static inline int _xtensa_handle_one_int0(unsigned int mask)
{
        int irq;

        return 0;
handle_irq:
        _sw_isr_table[irq].isr(_sw_isr_table[irq].arg);
        return mask;
}

How would one reach the label handle_irq from inside this function tho?

Any C ninjas, please enlighten me.

FYI: @lpereira

@nniranjhana This file has been auto-generated. I didn't bother special-casing it because the compiler would just remove it with dead-code elimination, but for some reason, I couldn't see those warnings on my machine. I'll update the script to not generate the label and anything after that.

Was this page helpful?
0 / 5 - 0 ratings