ctdb: Fix the O3 developer build
authorVolker Lendecke <vl@samba.org>
Tue, 21 Apr 2015 08:34:54 +0000 (10:34 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 21 Apr 2015 17:37:16 +0000 (19:37 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
ctdb/client/ctdb_client.c
ctdb/tools/ctdb.c

index f46cfc61ccd5efdcbfa7229bc03044a57026dadb..6e18269b4e372a047e6d600798409e14ae86963b 100644 (file)
@@ -3873,7 +3873,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 66d038365526a07307d5167f643065c5196c6e9c..9b7fb11831eaf91372ecf8ca8b0d6be6a69cf474 100644 (file)
@@ -340,7 +340,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) {
@@ -2803,7 +2803,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;
 
@@ -4589,9 +4589,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;
@@ -4615,9 +4615,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;
@@ -4647,8 +4647,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();