corosync/0006-Fix-compile-warnings-with-GCC-7.2.1.patch
Bin Liu 75e953789d Accepting request 598458 from home:BinLiu:branches:network:ha-clustering:Factory
- corosync-2.4.4 is available now(bsc#1089836)
      man:fix in corosync-qdevice.8
      quorumtool: remove duplicated help message
      cfg: nodeid should be unsigned int
      coroparse: Use readdir instead of readdir_r
      wd: fix snprintf warnings
      Fix compile errors in qdevice on FreeBSD
      qdevice: mv free(str) after port validation
      Fix various typos
      Fix typo: recomended -> recommended
      man: support SOURCE_DATE_EPOCH
      configure: add --with-initconfigdir option
      Use static case blocks to determine distro flavor
      Use RuntimeDirectory instead of tmpfiles.d
      coroparse: Do not convert empty uid, gid to 0
      sam: Fix snprintf compiler warnings
      quorumtool: Use full buffer size in snprintf
      man: Add note about qdevice parallel cmds start
      sync: Remove unneeded determine sync code
      sync: Call sync_init of all services at once
      corosync.conf: publicize nodelist.node.name
      totemudp[u]: Drop truncated packets on receive
      logging: Make blackbox configurable
      logging: Close before and open blackbox after fork
      init: Quote subshell result properly
      blackbox: Quote subshell result properly
      qdevice: quote certutils scripts properly
      sam_test_agent: Remove unused assignment
      qdevice: Fix NULL pointer dereference
      quorumtool: Don't set our_flags without v_handle

OBS-URL: https://build.opensuse.org/request/show/598458
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/corosync?expand=0&rev=143
2018-04-19 09:12:27 +00:00

38 lines
1.6 KiB
Diff

//cpg_test_agent: Fix snprintf compiler warnings
---
cts/agents/cpg_test_agent.c | 8 ++++----
exec/coroparse.c | 18 +++---------------
lib/sam.c | 36 ++++++++++++++++++++++++++++--------
tools/corosync-quorumtool.c | 2 +-
4 files changed, 36 insertions(+), 28 deletions(-)
diff --git a/cts/agents/cpg_test_agent.c b/cts/agents/cpg_test_agent.c
index 0837c69c..2224141c 100644
--- a/cts/agents/cpg_test_agent.c
+++ b/cts/agents/cpg_test_agent.c
@@ -211,8 +211,8 @@ static void config_change_callback (
if (record_config_events_g > 0) {
log_pt = malloc (sizeof(log_entry_t));
list_init (&log_pt->list);
- snprintf (log_pt->log, LOG_STR_SIZE, "%s,%u,%u,left",
- groupName->value, left_list[i].nodeid,left_list[i].pid);
+ assert(snprintf (log_pt->log, LOG_STR_SIZE, "%s,%u,%u,left",
+ groupName->value, left_list[i].nodeid,left_list[i].pid) < LOG_STR_SIZE);
list_add_tail(&log_pt->list, &config_chg_log_head);
qb_log (LOG_INFO, "cpg event %s", log_pt->log);
}
@@ -221,8 +221,8 @@ static void config_change_callback (
if (record_config_events_g > 0) {
log_pt = malloc (sizeof(log_entry_t));
list_init (&log_pt->list);
- snprintf (log_pt->log, LOG_STR_SIZE, "%s,%u,%u,join",
- groupName->value, joined_list[i].nodeid,joined_list[i].pid);
+ assert(snprintf (log_pt->log, LOG_STR_SIZE, "%s,%u,%u,join",
+ groupName->value, joined_list[i].nodeid,joined_list[i].pid) < LOG_STR_SIZE);
list_add_tail (&log_pt->list, &config_chg_log_head);
qb_log (LOG_INFO, "cpg event %s", log_pt->log);
}
--
2.13.6