From mboxrd@z Thu Jan 1 00:00:00 1970 From: rmccabe@sourceware.org Date: 26 Oct 2007 19:18:10 -0000 Subject: [Cluster-devel] cluster/ccs/lib libccs.c Message-ID: <20071026191810.27637.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit CVSROOT: /cvs/cluster Module name: cluster Changes by: rmccabe at sourceware.org 2007-10-26 19:18:10 Modified files: ccs/lib : libccs.c Log message: Keep gcc from reporting a bogus warning when compiling with -Wformat=2 Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/ccs/lib/libccs.c.diff?cvsroot=cluster&r1=1.12&r2=1.13 --- cluster/ccs/lib/libccs.c 2007/10/11 05:10:49 1.12 +++ cluster/ccs/lib/libccs.c 2007/10/26 19:18:10 1.13 @@ -702,7 +702,6 @@ ** Try to match against each clusternode in cluster.conf. */ for (i = 1 ; ; i++) { - const char *pathstr = NULL; char canonical_name[128]; unsigned int altcnt; @@ -717,7 +716,9 @@ char cur_node[128]; if (altcnt != 0) { - ret = snprintf(path, sizeof(path), pathstr, i, altcnt); + ret = snprintf(path, sizeof(path), + "/cluster/clusternodes/clusternode[%u]/altname[%u]/@name", + i, altcnt); if (ret < 0 || (size_t) ret >= sizeof(path)) continue; } @@ -788,8 +789,7 @@ free(str); - /* Try any altnames */ - pathstr = "/cluster/clusternodes/clusternode[%u]/altname[%u]/@name"; + /* Now try any altnames */ } }