Fix the O3 developer build
authorVolker Lendecke <vl@samba.org>
Tue, 21 Apr 2015 08:34:54 +0000 (10:34 +0200)
committerMartin Schwenke <martin@meltin.net>
Wed, 24 Feb 2016 06:12:30 +0000 (17:12 +1100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
(Imported from commit b8ac9853b0483fc4af82f731337464f9b5aaf53c)

client/ctdb_client.c
tools/ctdb.c

index 32c935750a5adbb53be0207bdc72dde061634e82..d09e1c64147accb16f2e1f76c879154859e1a0e5 100644 (file)
@@ -3845,7 +3845,7 @@ static bool server_id_exists(struct ctdb_context *ctdb, struct server_id *id)
 {
        struct ctdb_server_id sid;
        int ret;
-       uint32_t result;
+       uint32_t result = 0;
 
        sid.type = SERVER_TYPE_SAMBA;
        sid.pnn = id->vnn;
index 2b40f16b2284f94f54fda33d6d07ec4bf5b8a16c..6eacd83349968a3d7eebdc2147796009029605e8 100644 (file)
@@ -331,7 +331,7 @@ static bool db_exists(struct ctdb_context *ctdb, const char *dbarg,
        bool dbid_given = false, found = false;
        uint32_t id;
        TALLOC_CTX *tmp_ctx = talloc_new(ctdb);
-       const char *name;
+       const char *name = NULL;
 
        ret = ctdb_ctrl_getdbmap(ctdb, TIMELIMIT(), options.pnn, tmp_ctx, &dbmap);
        if (ret != 0) {
@@ -2853,7 +2853,7 @@ static int unregsrvid(struct ctdb_context *ctdb, int argc, const char **argv)
  */
 static int chksrvid(struct ctdb_context *ctdb, int argc, const char **argv)
 {
-       uint32_t status;
+       uint32_t status = 0;
        int ret;
        struct ctdb_server_id server_id;
 
@@ -4760,9 +4760,9 @@ static int control_getdbmap(struct ctdb_context *ctdb, int argc, const char **ar
        if(options.machinereadable){
                printm(":ID:Name:Path:Persistent:Sticky:Unhealthy:ReadOnly:\n");
                for(i=0;i<dbmap->num;i++){
-                       const char *path;
-                       const char *name;
-                       const char *health;
+                       const char *path = NULL;
+                       const char *name = NULL;
+                       const char *health = NULL;
                        bool persistent;
                        bool readonly;
                        bool sticky;
@@ -4786,9 +4786,9 @@ static int control_getdbmap(struct ctdb_context *ctdb, int argc, const char **ar
 
        printf("Number of databases:%d\n", dbmap->num);
        for(i=0;i<dbmap->num;i++){
-               const char *path;
-               const char *name;
-               const char *health;
+               const char *path = NULL;
+               const char *name = NULL;
+               const char *health = NULL;
                bool persistent;
                bool readonly;
                bool sticky;
@@ -4818,8 +4818,8 @@ static int control_getdbstatus(struct ctdb_context *ctdb, int argc, const char *
        const char *db_name;
        uint32_t db_id;
        uint8_t flags;
-       const char *path;
-       const char *health;
+       const char *path = NULL;
+       const char *health = NULL;
 
        if (argc < 1) {
                usage();