diff options
author | Nick Mathewson <nickm@torproject.org> | 2021-01-19 12:49:31 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2021-01-19 12:49:31 -0500 |
commit | 6c1bc570cf49c8e493d3278fefaf0c77e289f82c (patch) | |
tree | 834e9e5b019f6daba7c2a963ff4184cedad9fe55 /src/lib | |
parent | f79a31f6d50b6b44e0bef091f3e6df0d473141bd (diff) | |
parent | 4c82c2d1d4a9800f82bcc47c227a8e6a2a0d168d (diff) | |
download | tor-6c1bc570cf49c8e493d3278fefaf0c77e289f82c.tar.gz tor-6c1bc570cf49c8e493d3278fefaf0c77e289f82c.zip |
Merge branch 'maint-0.4.4' into maint-0.4.5
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/log/util_bug.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/log/util_bug.h b/src/lib/log/util_bug.h index 6b27b36f03..684dc7c6dd 100644 --- a/src/lib/log/util_bug.h +++ b/src/lib/log/util_bug.h @@ -249,6 +249,17 @@ #endif /* defined(ALL_BUGS_ARE_FATAL) || ... */ +/** + * Use this macro after a nonfatal assertion, and before a case statement + * where you would want to fall through. + */ +#ifdef ALL_BUGS_ARE_FATAL +#define FALLTHROUGH_UNLESS_ALL_BUGS_ARE_FATAL \ + abort() +#else +#define FALLTHROUGH_UNLESS_ALL_BUGS_ARE_FATAL FALLTHROUGH +#endif + /** In older code, we used tor_fragile_assert() to mark optional failure * points. At these points, we could make some debug builds fail. * (But release builds would continue.) |