From: Olivier Houchard Date: Thu, 16 Jul 2026 17:00:44 +0000 (+0200) Subject: CLEANUP: event_hdl: Use BUG_ON_STATIC() X-Git-Url: http://git.kaiwu.me/web/%22data:,/$%7BGITURL%7D/static//%22?a=commitdiff_plain;ds=inline;p=haproxy.git CLEANUP: event_hdl: Use BUG_ON_STATIC() Now that we have a BUG_ON_STATIC() macro, use it instead of rolling our own. --- diff --git a/include/haproxy/event_hdl.h b/include/haproxy/event_hdl.h index 7985e7001..5f2db6ca0 100644 --- a/include/haproxy/event_hdl.h +++ b/include/haproxy/event_hdl.h @@ -342,8 +342,7 @@ int event_hdl_lookup_resume(event_hdl_sub_list *sub_list, * EVENT_HDL_ASYNC_EVENT_DATA \ * size in event_hdl-t.h \ */ \ - __attribute__((unused)) \ - char __static_assert[(size <= EVENT_HDL_ASYNC_EVENT_DATA) ? 1 : -1];\ + BUG_ON_STATIC(size > EVENT_HDL_ASYNC_EVENT_DATA); \ (size); \ }) #define _EVENT_HDL_CB_DATA(data,size,mfree) \