diff options
| author | mingodad <mingodad@gmail.com> | 2014-03-30 10:10:24 +0100 |
|---|---|---|
| committer | mingodad <mingodad@gmail.com> | 2014-03-30 10:18:18 +0100 |
| commit | 5a5fee867a2427b35bf6acec3e176e768cb5b7d2 (patch) | |
| tree | aa233ee3f5c74bf107dc6b49021ae8f38b87dc10 | |
| parent | 80811671d439e4953961e3bcbe7ce09a34c96d2a (diff) | |
| download | tinycc-5a5fee867a2427b35bf6acec3e176e768cb5b7d2.tar.gz tinycc-5a5fee867a2427b35bf6acec3e176e768cb5b7d2.tar.bz2 | |
Add __attribute__ ((noreturn)) to tcc_error and expect functions.
This make use of static analysis tools like scan-build report less false positives.
| -rw-r--r-- | tcc.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1045,7 +1045,7 @@ PUB_FUNC char *tcc_strdup(const char *str); #define strdup(s) use_tcc_strdup(s) PUB_FUNC void tcc_memstats(void); 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, ...); /* other utilities */ @@ -1143,7 +1143,7 @@ ST_FUNC void preprocess_init(TCCState *s1); ST_FUNC void preprocess_new(void); ST_FUNC int tcc_preprocess(TCCState *s1); ST_FUNC void skip(int c); -ST_FUNC void expect(const char *msg); +ST_FUNC void expect(const char *msg) __attribute__ ((noreturn)); /* ------------ tccgen.c ------------ */ |
