aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlistair Delva <adelva@google.com>2020-08-05 10:32:17 -0700
committerAlistair Delva <adelva@google.com>2020-08-05 10:43:35 -0700
commit3c3710e89ac92ac69c90f70ba63a52a97fe41746 (patch)
tree3496e01a7d8d1d423da8ba3a6a3e5a2ac2b3b185
parent3f3b1e4cad13e7fb74cd330dd1d5a93ecb41230c (diff)
downloadswig-3c3710e89ac92ac69c90f70ba63a52a97fe41746.tar.gz
swig: Annotate SWIG_exit() with noreturn
Android builds all host tools with -Werror=no-return, which generates a false positive in name_regexmatch_value() if HAVE_PCRE is not present. Fix this by annotating SWIG_exit() with noreturn so the compiler knows that the call will not return, thus the missing return code is in fact not a problem. Bug: 162801433 Change-Id: I0ee1ec89eff1f3e7aaf9056dda5543734bec2980
-rw-r--r--Source/Swig/swig.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Swig/swig.h b/Source/Swig/swig.h
index e0783dae1..523aef583 100644
--- a/Source/Swig/swig.h
+++ b/Source/Swig/swig.h
@@ -438,7 +438,7 @@ extern int ParmList_is_compactdefargs(ParmList *p);
extern void Language_replace_special_variables(String *method, String *tm, Parm *parm);
extern void Swig_print(DOH *object, int count);
extern void Swig_print_with_location(DOH *object, int count);
- extern void SWIG_exit(int exit_code);
+ extern void SWIG_exit(int exit_code) __attribute__((noreturn));
/* -- template init -- */