[pve-devel] [PATCH cluster 2/4] Wpedantic: add casts to void* for pointer printing
Thomas Lamprecht
t.lamprecht at proxmox.com
Fri Sep 7 13:50:45 CEST 2018
Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
data/src/dfsm.c | 4 ++--
data/src/pmxcfs.c | 2 +-
data/src/quorum.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/data/src/dfsm.c b/data/src/dfsm.c
index e18fd5e..44b4c62 100644
--- a/data/src/dfsm.c
+++ b/data/src/dfsm.c
@@ -650,7 +650,7 @@ dfsm_cpg_deliver_callback(
dfsm_t *dfsm = NULL;
result = cpg_context_get(handle, (gpointer *)&dfsm);
if (result != CS_OK || !dfsm || dfsm->cpg_callbacks != &cpg_callbacks) {
- cfs_critical("cpg_context_get error: %d (%p)", result, dfsm);
+ cfs_critical("cpg_context_get error: %d (%p)", result, (void *) dfsm);
return; /* we have no valid dfsm pointer, so we can just ignore this */
}
dfsm_mode_t mode = dfsm_get_mode(dfsm);
@@ -1108,7 +1108,7 @@ dfsm_cpg_confchg_callback(
dfsm_t *dfsm = NULL;
result = cpg_context_get(handle, (gpointer *)&dfsm);
if (result != CS_OK || !dfsm || dfsm->cpg_callbacks != &cpg_callbacks) {
- cfs_critical("cpg_context_get error: %d (%p)", result, dfsm);
+ cfs_critical("cpg_context_get error: %d (%p)", result, (void *) dfsm);
return; /* we have no valid dfsm pointer, so we can just ignore this */
}
diff --git a/data/src/pmxcfs.c b/data/src/pmxcfs.c
index 2fe7c59..2e78fdf 100644
--- a/data/src/pmxcfs.c
+++ b/data/src/pmxcfs.c
@@ -107,7 +107,7 @@ static cfs_plug_t *find_plug(const char *path, char **sub)
cfs_plug_t *plug = root_plug->lookup_plug(root_plug, &subpath);
- cfs_debug("find_plug end %s = %p (%s)", path, plug, subpath);
+ cfs_debug("find_plug end %s = %p (%s)", path, (void *) plug, subpath);
if (subpath && subpath[0])
*sub = g_strdup(subpath);
diff --git a/data/src/quorum.c b/data/src/quorum.c
index d9afc1d..3de54b3 100644
--- a/data/src/quorum.c
+++ b/data/src/quorum.c
@@ -56,7 +56,7 @@ static void quorum_notification_fn(
result = quorum_context_get(handle, (gconstpointer *)&private);
if (result != CS_OK || !private) {
- cfs_critical("quorum_context_get error: %d (%p)", result, private);
+ cfs_critical("quorum_context_get error: %d (%p)", result, (void *) private);
return;
}
--
2.18.0
More information about the pve-devel
mailing list