From 8a1ba4d151f1f459f6384ca18c819b2d783c7408 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 6 Apr 2025 18:12:22 -0600 Subject: [PATCH] [test-object] See if this helps make ubsan happy --- test/api/test-object.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/api/test-object.c b/test/api/test-object.c index 0da1c5a3c..3689f83c9 100644 --- a/test/api/test-object.c +++ b/test/api/test-object.c @@ -136,6 +136,9 @@ typedef struct { const char *name; } object_t; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wcast-function-type" + #define OBJECT_WITHOUT_IMMUTABILITY(name) \ { \ (create_func_t) create_##name, \ @@ -363,6 +366,7 @@ test_object (void) } } +#pragma GCC diagnostic pop int main (int argc, char **argv)