diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-06-09 17:44:41 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-06-09 17:44:41 -0600 |
commit | dd8f8ebac1bb3c854b607f43f0e63e105e099dd0 (patch) | |
tree | 48174617ffe2a0c3061890d9b0cc92ee4f0ed6e5 /libmisc | |
parent | 966fd48cc8a6324f347a08a8c6057060e8b5dc75 (diff) |
libmisc: assert.h: Disable -Wtype-limits inside of assert()
Diffstat (limited to 'libmisc')
-rw-r--r-- | libmisc/include/libmisc/assert.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libmisc/include/libmisc/assert.h b/libmisc/include/libmisc/assert.h index ccdb288..18ca2e5 100644 --- a/libmisc/include/libmisc/assert.h +++ b/libmisc/include/libmisc/assert.h @@ -12,7 +12,10 @@ #else # define __assert_msg(expr, expr_str, msg) \ do { \ + _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wtype-limits\"") \ if (!(expr)) \ + _Pragma("GCC diagnostic pop") \ __assert_msg_fail(expr_str, __FILE__, __LINE__, __func__, msg); \ } while (0) [[noreturn]] void __assert_msg_fail(const char *expr, |