From 87b60e4e94229e20510e4c0d9b8f2d45b0973660 Mon Sep 17 00:00:00 2001 From: Ryan Lee Date: Wed, 12 Feb 2025 14:43:43 -0800 Subject: [PATCH] libapparmor: swig: specify message for static_assert usages The message being optional is apparently a C23 thing that was available as an extension on the systems I tested on previously Signed-off-by: Ryan Lee --- libraries/libapparmor/swig/SWIG/libapparmor.i | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libraries/libapparmor/swig/SWIG/libapparmor.i b/libraries/libapparmor/swig/SWIG/libapparmor.i index 1e9252d76..f31e2f60b 100644 --- a/libraries/libapparmor/swig/SWIG/libapparmor.i +++ b/libraries/libapparmor/swig/SWIG/libapparmor.i @@ -258,7 +258,7 @@ extern int aa_is_enabled(void); * allocation uninitialized (0) != SWIG_NEWOBJ */ %#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L - static_assert(SWIG_NEWOBJ != 0); + static_assert(SWIG_NEWOBJ != 0, "SWIG_NEWOBJ is 0"); %#endif if ($1 != NULL && alloc_tracking$argnum != NULL) { for (Py_ssize_t i=0; i= 201112L - static_assert(sizeof(pid_t) <= sizeof(long)); + static_assert(sizeof(pid_t) <= sizeof(long), + "pid_t type is too large to be stored in a long"); %#endif conv_pid = SWIG_AsVal_long($input, &pid_large); if (!SWIG_IsOK(conv_pid)) {