CVSROOT:        /cvs/cluster
Module name:    cluster
Changes by:     [EMAIL PROTECTED]       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 */
                }
        }
 

Reply via email to