Fix some clang uninitialized errors
authorVolker Lendecke <vl@samba.org>
Wed, 19 Aug 2015 05:35:32 +0000 (07:35 +0200)
committerMartin Schwenke <martin@meltin.net>
Wed, 24 Feb 2016 10:44:28 +0000 (21:44 +1100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(Imported from commit 963874279997b98c8b29bee6d2417f81a0e8b0d2)

tools/ctdb.c

index b44d9030ed2e7b02f9ec99977999c8b5058cb244..a83645589b404f510dda1bd7017f8eb0fa108e56 100644 (file)
@@ -5071,7 +5071,7 @@ static int control_getreclock(struct ctdb_context *ctdb, int argc, const char **
 static int control_setreclock(struct ctdb_context *ctdb, int argc, const char **argv)
 {
        int ret;
-       const char *reclock;
+       const char *reclock = NULL;
 
        if (argc == 0) {
                reclock = NULL;
@@ -5095,7 +5095,7 @@ static int control_setreclock(struct ctdb_context *ctdb, int argc, const char **
 static int control_setnatgwstate(struct ctdb_context *ctdb, int argc, const char **argv)
 {
        int ret;
-       uint32_t natgwstate;
+       uint32_t natgwstate = 0;
 
        if (argc == 0) {
                usage();
@@ -5124,7 +5124,7 @@ static int control_setnatgwstate(struct ctdb_context *ctdb, int argc, const char
 static int control_setlmasterrole(struct ctdb_context *ctdb, int argc, const char **argv)
 {
        int ret;
-       uint32_t lmasterrole;
+       uint32_t lmasterrole = 0;
 
        if (argc == 0) {
                usage();
@@ -5153,7 +5153,7 @@ static int control_setlmasterrole(struct ctdb_context *ctdb, int argc, const cha
 static int control_setrecmasterrole(struct ctdb_context *ctdb, int argc, const char **argv)
 {
        int ret;
-       uint32_t recmasterrole;
+       uint32_t recmasterrole = 0;
 
        if (argc == 0) {
                usage();