History

Add __attribute__ ((noreturn)) to tcc_error and expect functions. This make use of static analysis tools like scan-build report less false positives.

mingodad committed 12 years ago

Commit 5a5fee81 parent 80811671 file · +2 −2Browse files

Unified · Split

tcc.h+2−2
@@ -1045,7 +1045,7 @@ PUB_FUNC char *tcc_strdup(const char *str); · 1044 unmodified lines
10451045 #define strdup(s) use_tcc_strdup(s)
10461046 PUB_FUNC void tcc_memstats(void);
10471047 PUB_FUNC void tcc_error_noabort(const char *fmt, ...);
1048−PUB_FUNC void tcc_error(const char *fmt, ...);
1048+PUB_FUNC void tcc_error(const char *fmt, ...) __attribute__ ((noreturn));
10491049 PUB_FUNC void tcc_warning(const char *fmt, ...);
10501050
10511051 /* other utilities */
@@ -1143,7 +1143,7 @@ ST_FUNC void preprocess_init(TCCState *s1); · 91 unmodified lines
11431143 ST_FUNC void preprocess_new(void);
11441144 ST_FUNC int tcc_preprocess(TCCState *s1);
11451145 ST_FUNC void skip(int c);
1146−ST_FUNC void expect(const char *msg);
1146+ST_FUNC void expect(const char *msg) __attribute__ ((noreturn));
11471147
11481148 /* ------------ tccgen.c ------------ */
11491149

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t