From 5153e04f964b75b72cf9330dcef6e197769edca4 Mon Sep 17 00:00:00 2001 From: "jabber.developer2" Date: Fri, 16 Jan 2026 16:40:01 +0300 Subject: [PATCH] feat: update compatibility header for cmocka 2.0 deprecation handling --- tests/prof_cmocka.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/prof_cmocka.h b/tests/prof_cmocka.h index c8561404..7d87a03c 100644 --- a/tests/prof_cmocka.h +++ b/tests/prof_cmocka.h @@ -1,5 +1,22 @@ +/* + * Compatibility header for cmocka 1.x and 2.x + * + * cmocka 2.0 (released Dec 2025) deprecated several macros: + * - will_return() -> will_return_int() / will_return_ptr() + * - mock_type() -> mock_int() / mock_ptr_type() + * - check_expected() -> check_expected_int() / check_expected_ptr() + * + * This header disables deprecation warnings for backward compatibility + * with cmocka 1.x style code. + */ + #include +#include #include #include #include + +/* Disable cmocka 2.0 deprecation warnings for backward compatibility */ +#define CMOCKA_DISABLE_DEPRECATION_WARNINGS + #include