Quando compilo il programma C di seguito, ricevo questo avviso: ‘noreturn’ function does return
. Questa è la funzione:La funzione 'noreturn' restituisce
void hello(void){
int i;
i=1;
}
Perché potrebbe succedere? Tutta la chiamata a questa funzione è hello();
EDIT: L'uscita di errore completo:
home.c: In function ‘hello’:
hhme.c:838:7: error: variable ‘i’ set but not used [-Werror=unused-but-set-variable]
home.c:840:1: error: ‘noreturn’ function does return [-Werror]
cc1: all warnings being treated as errors
make: *** [home.o] Error 1
puoi pubblicare l'avviso esatto del compilatore? –
Potresti creare un [SSCCE] (http://sscce.org/) e mostrarci un esempio completo? Si prega inoltre di includere _all_ e _complete_ messaggi di errore/avviso. –
Che compilatore stai usando? Quali opzioni del compilatore hai usato? – Bechir