File pacemaker#3600-0001-Refactor-libcrmcommon-mark-configuration-message-han.patch of Package pacemaker.36799

From f0d10093fd76f7c4e105200124eaae6ca86a2f0a Mon Sep 17 00:00:00 2001
From: Ken Gaillot <kgaillot@redhat.com>
Date: Tue, 6 Aug 2024 09:41:44 -0500
Subject: [PATCH 1/2] Refactor: libcrmcommon: mark configuration message
 handlers as printf-like

... so pcmk__config_warn() and pcmk__config_err() format errors are detected at
compile time
---
 include/crm/common/logging_internal.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Index: pacemaker-2.1.7+20231219.0f7f88312/include/crm/common/logging_internal.h
===================================================================
--- pacemaker-2.1.7+20231219.0f7f88312.orig/include/crm/common/logging_internal.h
+++ pacemaker-2.1.7+20231219.0f7f88312/include/crm/common/logging_internal.h
@@ -19,8 +19,10 @@ extern "C" {
 #  include <crm/common/logging.h>
 #  include <crm/common/output_internal.h>
 
-typedef void (*pcmk__config_error_func) (void *ctx, const char *msg, ...);
-typedef void (*pcmk__config_warning_func) (void *ctx, const char *msg, ...);
+typedef void (*pcmk__config_error_func) (void *ctx, const char *msg, ...)
+        G_GNUC_PRINTF(2, 3);
+typedef void (*pcmk__config_warning_func) (void *ctx, const char *msg, ...)
+        G_GNUC_PRINTF(2, 3);
 
 extern pcmk__config_error_func pcmk__config_error_handler;
 extern pcmk__config_warning_func pcmk__config_warning_handler;
openSUSE Build Service is sponsored by