commit 8482e8079eee49ede9657c3728f8b3f89537e787
Author: Jan Pokorný <jpokorny@redhat.com>
Date:   Wed Apr 4 20:26:58 2018 +0200

    Log: establish correct character string literals also with qb_logt sink
    
    Immediate follow-up for 29618ef63 (observation of that issue provoked
    this very catch-all iteration), and thematically for fc87717a9.
    
    Note that as in the latter case, this discovery was also enabled with
    a special instrumentation at the libqb's side, but this time around,
    it wasn't so straightforward:
    <INSERT PR LINK HERE>

Index: pacemaker-1.1.21+20191028.ec87f387f/attrd/commands.c
===================================================================
--- pacemaker-1.1.21+20191028.ec87f387f.orig/attrd/commands.c
+++ pacemaker-1.1.21+20191028.ec87f387f/attrd/commands.c
@@ -477,7 +477,7 @@ attrd_client_query(crm_client_t *client,
     /* Send the reply to the client */
     client->request_id = 0;
     if ((rc = crm_ipcs_send(client, id, reply, flags)) < 0) {
-        crm_err("Could not respond to query from %s: %s (%d)",
+        crm_err("Could not respond to query from %s: %s (%zd)",
                 origin, pcmk_strerror(-rc), -rc);
     }
     free_xml(reply);
Index: pacemaker-1.1.21+20191028.ec87f387f/cib/notify.c
===================================================================
--- pacemaker-1.1.21+20191028.ec87f387f.orig/cib/notify.c
+++ pacemaker-1.1.21+20191028.ec87f387f/cib/notify.c
@@ -152,7 +152,7 @@ cib_notify_send(xmlNode * xml)
         g_hash_table_foreach_remove(client_connections, cib_notify_send_one, &update);
 
     } else {
-        crm_notice("Notification failed: %s (%d)", pcmk_strerror(rc), rc);
+        crm_notice("Notification failed: %s (%zd)", pcmk_strerror(rc), rc);
     }
 
     if (iov) {
Index: pacemaker-1.1.21+20191028.ec87f387f/crmd/lrm.c
===================================================================
--- pacemaker-1.1.21+20191028.ec87f387f.orig/crmd/lrm.c
+++ pacemaker-1.1.21+20191028.ec87f387f/crmd/lrm.c
@@ -2122,7 +2122,8 @@ stop_recurring_actions(gpointer key, gpo
     struct recurring_op_s *op = (struct recurring_op_s *)value;
 
     if (op->interval != 0) {
-        crm_info("Cancelling op %d for %s (%s)", op->call_id, op->rsc_id, key);
+        crm_info("Cancelling op %d for %s (%s)", op->call_id, op->rsc_id,
+                 (const char *) key);
         remove = !cancel_op(lrm_state, op->rsc_id, key, op->call_id, FALSE);
     }
 
Index: pacemaker-1.1.21+20191028.ec87f387f/fencing/remote.c
===================================================================
--- pacemaker-1.1.21+20191028.ec87f387f.orig/fencing/remote.c
+++ pacemaker-1.1.21+20191028.ec87f387f/fencing/remote.c
@@ -1968,7 +1968,7 @@ process_remote_stonith_exec(xmlNode * ms
     if (op->devices && device && safe_str_neq(op->devices->data, device)) {
         crm_err("Received outdated reply for device %s (instead of %s) to "
                 "fence (%s) %s. Operation already timed out at peer level.",
-                device, op->devices->data, op->action, op->target);
+                device, (const char *) op->devices->data, op->action, op->target);
         return rc;
     }
 
Index: pacemaker-1.1.21+20191028.ec87f387f/lib/common/ipc.c
===================================================================
--- pacemaker-1.1.21+20191028.ec87f387f.orig/lib/common/ipc.c
+++ pacemaker-1.1.21+20191028.ec87f387f/lib/common/ipc.c
@@ -796,7 +796,7 @@ crm_ipcs_sendv(crm_client_t * c, struct
 
         rc = qb_ipcs_response_sendv(c->ipcs, iov, 2);
         if (rc < header->qb.size) {
-            crm_notice("Response %d to %p[%d] (%u bytes) failed: %s (%d)",
+            crm_notice("Response %d to %p[%d] (%u bytes) failed: %s (%zd)",
                        header->qb.id, c->ipcs, c->pid, header->qb.size, pcmk_strerror(rc), rc);
 
         } else {
@@ -842,7 +842,7 @@ crm_ipcs_send(crm_client_t * c, uint32_t
 
     } else {
         free(iov);
-        crm_notice("Message to %p[%d] failed: %s (%d)",
+        crm_notice("Message to %p[%d] failed: %s (%zd)",
                    c->ipcs, c->pid, pcmk_strerror(rc), rc);
     }
 
Index: pacemaker-1.1.21+20191028.ec87f387f/lib/common/remote.c
===================================================================
--- pacemaker-1.1.21+20191028.ec87f387f.orig/lib/common/remote.c
+++ pacemaker-1.1.21+20191028.ec87f387f/lib/common/remote.c
@@ -119,7 +119,9 @@ crm_remote_header(crm_remote_t * remote)
 
         CRM_LOG_ASSERT(endian == ENDIAN_LOCAL);
         if(endian != ENDIAN_LOCAL) {
-            crm_err("Invalid message detected, endian mismatch: %lx is neither %lx nor the swab'd %lx",
+            /* XXX preprocessor conditionalizing based on, e.g., sizeof and/or
+                   inttypes.h/stdint.h to get character string literals fit */
+            crm_err("Invalid message detected, endian mismatch: %x is neither %x nor the swab'd %x",
                     ENDIAN_LOCAL, header->endian, endian);
             return NULL;
         }
Index: pacemaker-1.1.21+20191028.ec87f387f/lib/common/xml.c
===================================================================
--- pacemaker-1.1.21+20191028.ec87f387f.orig/lib/common/xml.c
+++ pacemaker-1.1.21+20191028.ec87f387f/lib/common/xml.c
@@ -1673,7 +1673,7 @@ xml_apply_patchset_v2(xmlNode *xml, xmlN
             }
 
             if(position != __xml_offset(match)) {
-                crm_err("Moved %s.%d to position %d instead of %d (%p)",
+                crm_err("Moved %s.%s to position %d instead of %d (%p)",
                         match->name, ID(match), __xml_offset(match), position, match->prev);
                 rc = -pcmk_err_diff_failed;
             }
@@ -2222,7 +2222,7 @@ stdin2xml(void)
         size_t next = XML_BUFFER_SIZE + data_length + 1;
 
         if(next <= 0) {
-            crm_err("Buffer size exceeded at: %l + %d", data_length, XML_BUFFER_SIZE);
+            crm_err("Buffer size exceeded at: %zu + %d", data_length, XML_BUFFER_SIZE);
             break;
         }
 
Index: pacemaker-1.1.21+20191028.ec87f387f/lib/pengine/utils.c
===================================================================
--- pacemaker-1.1.21+20191028.ec87f387f.orig/lib/pengine/utils.c
+++ pacemaker-1.1.21+20191028.ec87f387f/lib/pengine/utils.c
@@ -2458,8 +2458,8 @@ void pe_action_set_flag_reason(const cha
     } else if(is_set(flags, pe_action_requires_any)) {
         change = "required";
     } else {
-        crm_err("Unknown flag change to %s by %s: 0x%.16x",
-                flags, action->uuid, (reason? reason->uuid : 0));
+        crm_err("Unknown flag change to %x by %s: 0x%s",
+                flags, action->uuid, (reason? reason->uuid : "0"));
     }
 
     if(unset) {
Index: pacemaker-1.1.21+20191028.ec87f387f/tools/crm_resource_runtime.c
===================================================================
--- pacemaker-1.1.21+20191028.ec87f387f.orig/tools/crm_resource_runtime.c
+++ pacemaker-1.1.21+20191028.ec87f387f/tools/crm_resource_runtime.c
@@ -1030,7 +1030,8 @@ subtract_lists(GList *from, GList *items
     for (item = items; item != NULL; item = item->next) {
         GList *candidate = NULL;
         for (candidate = from; candidate != NULL; candidate = candidate->next) {
-            crm_info("Comparing %s with %s", candidate->data, item->data);
+            crm_info("Comparing %s with %s", (const char *) candidate->data,
+                     (const char *) item->data);
             if(strcmp(candidate->data, item->data) == 0) {
                 result = g_list_remove(result, candidate->data);
                 break;
@@ -1625,7 +1626,7 @@ wait_till_stable(int timeout_ms, cib_t *
         /* Abort if timeout is reached */
         time_diff = expire_time - time(NULL);
         if (time_diff > 0) {
-            crm_info("Waiting up to %d seconds for cluster actions to complete", time_diff);
+            crm_info("Waiting up to %ld seconds for cluster actions to complete", time_diff);
         } else {
             print_pending_actions(data_set->actions);
             pe_free_working_set(data_set);
