Add __attribute__ ((noreturn)) to tcc_error and expect functions.

This make use of static analysis tools like scan-build report less false positives.
This commit is contained in:
mingodad 2014-03-30 10:10:24 +01:00
parent 80811671d4
commit 5a5fee867a

4
tcc.h
View File

@ -1045,7 +1045,7 @@ PUB_FUNC char *tcc_strdup(const char *str);
#define strdup(s) use_tcc_strdup(s) #define strdup(s) use_tcc_strdup(s)
PUB_FUNC void tcc_memstats(void); PUB_FUNC void tcc_memstats(void);
PUB_FUNC void tcc_error_noabort(const char *fmt, ...); PUB_FUNC void tcc_error_noabort(const char *fmt, ...);
PUB_FUNC void tcc_error(const char *fmt, ...); PUB_FUNC void tcc_error(const char *fmt, ...) __attribute__ ((noreturn));
PUB_FUNC void tcc_warning(const char *fmt, ...); PUB_FUNC void tcc_warning(const char *fmt, ...);
/* other utilities */ /* other utilities */
@ -1143,7 +1143,7 @@ ST_FUNC void preprocess_init(TCCState *s1);
ST_FUNC void preprocess_new(void); ST_FUNC void preprocess_new(void);
ST_FUNC int tcc_preprocess(TCCState *s1); ST_FUNC int tcc_preprocess(TCCState *s1);
ST_FUNC void skip(int c); ST_FUNC void skip(int c);
ST_FUNC void expect(const char *msg); ST_FUNC void expect(const char *msg) __attribute__ ((noreturn));
/* ------------ tccgen.c ------------ */ /* ------------ tccgen.c ------------ */