Fix the developer O3 build
authorVolker Lendecke <vl@samba.org>
Wed, 25 Feb 2015 12:19:44 +0000 (12:19 +0000)
committerAlexander Bokovoy <ab@samba.org>
Wed, 25 Feb 2015 15:32:29 +0000 (16:32 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Alexander Bokovoy <ab@samba.org>
Autobuild-Date(master): Wed Feb 25 16:32:29 CET 2015 on sn-devel-104

23 files changed:
examples/libsmbclient/testacl.c
source3/utils/regedit.c
source3/utils/regedit_list.c
source3/utils/smbfilter.c
source4/auth/gensec/gensec_gssapi.c
source4/dsdb/dns/dns_update.c
source4/dsdb/kcc/kcc_drs_replica_info.c
source4/dsdb/repl/drepl_out_helpers.c
source4/dsdb/samdb/ldb_modules/operational.c
source4/dsdb/samdb/ldb_modules/samldb.c
source4/dsdb/samdb/ldb_modules/schema_util.c
source4/lib/registry/patchfile_dotreg.c
source4/lib/registry/regf.c
source4/ntvfs/ipc/ipc_rap.c
source4/rpc_server/backupkey/dcesrv_backupkey.c
source4/rpc_server/drsuapi/getncchanges.c
source4/rpc_server/lsa/dcesrv_lsa.c
source4/torture/rpc/backupkey.c
source4/torture/rpc/lsa.c
source4/torture/rpc/schannel.c
source4/torture/rpc/svcctl.c
source4/torture/winbind/struct_based.c
source4/winbind/wb_server.c

index b602c5b..99a6d13 100644 (file)
@@ -21,7 +21,7 @@ enum acl_mode
 int main(int argc, const char *argv[])
 {
     int opt;
-    int flags;
+    int flags = 0;
     int debug = 0;
     int numeric = 0;
     int stat_and_retry = 0;
index bff23ec..21437f4 100644 (file)
@@ -161,7 +161,7 @@ static void add_reg_key(struct regedit *regedit, struct tree_node *node,
        if (name) {
                WERROR rv;
                struct registry_key *new_key;
-               struct tree_node *new_node;
+               struct tree_node *new_node = NULL;
                struct tree_node *list;
                struct tree_node *parent;
 
index c2b3705..8ee2d5e 100644 (file)
@@ -491,7 +491,7 @@ void multilist_refresh(struct multilist *list)
 void multilist_driver(struct multilist *list, int c)
 {
        unsigned page;
-       const void *tmp;
+       const void *tmp = NULL;
 
        if (list->nrows == 0) {
                return;
index ff966a8..1f55ec8 100644 (file)
@@ -85,7 +85,8 @@ static void filter_request(char *buf, size_t buf_len)
        int type = CVAL(buf,smb_com);
        unsigned x;
        fstring name1,name2;
-       int name_len1, name_len2;
+       int name_len1 = 0;
+       int name_len2;
        int name_type1, name_type2;
 
        if (msg_type) {
index 2bc6422..c168d8a 100644 (file)
@@ -557,7 +557,7 @@ static NTSTATUS gensec_gssapi_update(struct gensec_security *gensec_security,
                        
                        return NT_STATUS_MORE_PROCESSING_REQUIRED;
                } else if (maj_stat == GSS_S_CONTEXT_EXPIRED) {
-                       gss_cred_id_t creds;
+                       gss_cred_id_t creds = NULL;
                        gss_name_t name;
                        gss_buffer_desc buffer;
                        OM_uint32 lifetime = 0;
@@ -584,7 +584,7 @@ static NTSTATUS gensec_gssapi_update(struct gensec_security *gensec_security,
                                                    &name, &lifetime, &usage, NULL);
 
                        if (maj_stat == GSS_S_COMPLETE) {
-                               const char *usage_string;
+                               const char *usage_string = NULL;
                                switch (usage) {
                                case GSS_C_BOTH:
                                        usage_string = "GSS_C_BOTH";
index aa617c6..972459a 100644 (file)
@@ -456,7 +456,8 @@ static NTSTATUS dnsupdate_dnsupdate_RODC(struct irpc_message *msg,
        struct tevent_req *req;
        int i, ret;
        struct GUID ntds_guid;
-       const char *site, *dnsdomain, *dnsforest, *ntdsguid, *hostname;
+       const char *site, *dnsdomain, *dnsforest, *ntdsguid;
+       const char *hostname = NULL;
        struct ldb_dn *sid_dn;
        const char *attrs[] = { "dNSHostName", NULL };
        struct ldb_result *res;
index 52c36ca..ef64f82 100644 (file)
@@ -214,7 +214,7 @@ static WERROR kccdrs_replica_get_info_obj_metadata2(TALLOC_CTX *mem_ctx,
                const struct dsdb_attribute *schema_attr;
                uint32_t attr_version;
                NTTIME attr_change_time;
-               uint32_t attr_originating_usn;
+               uint32_t attr_originating_usn = 0;
 
                /*
                  attr := attrsSeq[i]
index 3054323..c8a28ac 100644 (file)
@@ -565,7 +565,7 @@ static void dreplsrv_op_pull_source_get_changes_done(struct tevent_req *subreq)
        uint32_t ctr_level = 0;
        struct drsuapi_DsGetNCChangesCtr1 *ctr1 = NULL;
        struct drsuapi_DsGetNCChangesCtr6 *ctr6 = NULL;
-       enum drsuapi_DsExtendedError extended_ret;
+       enum drsuapi_DsExtendedError extended_ret = DRSUAPI_EXOP_ERR_NONE;
        state->ndr_struct_ptr = NULL;
 
        status = dcerpc_drsuapi_DsGetNCChanges_r_recv(subreq, r);
index f77474f..66dfca0 100644 (file)
@@ -143,7 +143,7 @@ static int construct_generic_token_groups(struct ldb_module *module,
        TALLOC_CTX *tmp_ctx = talloc_new(msg);
        unsigned int i;
        int ret;
-       const char *filter;
+       const char *filter = NULL;
 
        NTSTATUS status;
 
index 664ace0..e3a7db2 100644 (file)
@@ -2498,7 +2498,8 @@ static int samldb_service_principal_names_change(struct samldb_ctx *ac)
                }
 
                for (i = 0; i < res->msgs[0]->elements[0].num_values; i++) {
-                       char *old_str, *new_str, *pos;
+                       char *old_str, *new_str;
+                       char *pos = NULL;
                        const char *tok;
                        struct ldb_val *vals;
                        bool found = false;
index 86c21f0..c6d8ade 100644 (file)
@@ -143,7 +143,7 @@ int dsdb_module_schema_info_blob_write(struct ldb_module *ldb_module,
                                       struct ldb_request *parent)
 {
        int ldb_err;
-       struct ldb_message *msg;
+       struct ldb_message *msg = NULL;
        TALLOC_CTX *temp_ctx;
 
        temp_ctx = talloc_new(ldb_module);
index c4409dc..f537b97 100644 (file)
@@ -235,8 +235,8 @@ _PUBLIC_ WERROR reg_dotreg_diff_load(int fd,
        DATA_BLOB data;
        bool result;
        char *type_str = NULL;
-       char *data_str;
-       char *value;
+       char *data_str = NULL;
+       char *value = NULL;
        bool continue_next_line = 0;
 
        line = afdgets(fd, mem_ctx, 0);
index 8495e53..4b7145e 100644 (file)
@@ -253,7 +253,7 @@ static DATA_BLOB hbin_alloc(struct regf_data *data, uint32_t size,
        ret.data = hbin->data + rel_offset + 0x4; /* Skip past length */
        ret.length = size - 0x4;
        if (offset) {
-               uint32_t new_rel_offset;
+               uint32_t new_rel_offset = 0;
                *offset = hbin->offset_from_first + rel_offset + 0x20;
                SMB_ASSERT(hbin_by_offset(data, *offset, &new_rel_offset) == hbin);
                SMB_ASSERT(new_rel_offset == rel_offset);
@@ -1871,7 +1871,7 @@ static WERROR regf_set_value(struct hive_key *key, const char *name,
        struct vk_block vk;
        uint32_t i;
        uint32_t tmp_vk_offset, vk_offset, old_vk_offset = (uint32_t) -1;
-       DATA_BLOB values;
+       DATA_BLOB values = {0};
 
        ZERO_STRUCT(vk);
 
index 259dccc..9ddde5e 100644 (file)
@@ -255,6 +255,8 @@ static NTSTATUS _rap_netshareenum(struct rap_call *call)
 {
        struct rap_NetShareEnum r;
        NTSTATUS result;
+       uint32_t offset_save = 0;
+       struct rap_heap_save heap_save = {0};
 
        RAP_GOTO(rap_srv_pull_word(call, &r.in.level));
        RAP_GOTO(rap_srv_pull_bufsize(call, &r.in.bufsize));
@@ -282,8 +284,6 @@ static NTSTATUS _rap_netshareenum(struct rap_call *call)
        for (r.out.count = 0; r.out.count < r.out.available; r.out.count++) {
 
                int i = r.out.count;
-               uint32_t offset_save;
-               struct rap_heap_save heap_save;
 
                offset_save = call->ndr_push_data->offset;
                rap_heap_save(call->heap, &heap_save);
@@ -335,6 +335,8 @@ static NTSTATUS _rap_netserverenum2(struct rap_call *call)
 {
        struct rap_NetServerEnum2 r;
        NTSTATUS result;
+       uint32_t offset_save = 0;
+       struct rap_heap_save heap_save = {0};
 
        RAP_GOTO(rap_srv_pull_word(call, &r.in.level));
        RAP_GOTO(rap_srv_pull_bufsize(call, &r.in.bufsize));
@@ -364,8 +366,6 @@ static NTSTATUS _rap_netserverenum2(struct rap_call *call)
        for (r.out.count = 0; r.out.count < r.out.available; r.out.count++) {
 
                int i = r.out.count;
-               uint32_t offset_save;
-               struct rap_heap_save heap_save;
 
                offset_save = call->ndr_push_data->offset;
                rap_heap_save(call->heap, &heap_save);
index bef4c93..9dfd7a9 100644 (file)
@@ -569,7 +569,7 @@ static WERROR bkrp_client_wrap_decrypt_data(struct dcesrv_call_state *dce_call,
        char *guid_string;
        char *cert_secret_name;
        DATA_BLOB lsa_secret;
-       DATA_BLOB *uncrypted_data;
+       DATA_BLOB *uncrypted_data = NULL;
        NTSTATUS status;
        uint32_t requested_version;
        
index 9a405fd..d755306 100644 (file)
@@ -936,7 +936,8 @@ static WERROR getncchanges_repl_secret(struct drsuapi_bind_state *b_state,
                                       bool has_get_all_changes)
 {
        struct drsuapi_DsReplicaObjectIdentifier *ncRoot = req10->naming_context;
-       struct ldb_dn *obj_dn, *rodc_dn, *krbtgt_link_dn;
+       struct ldb_dn *obj_dn = NULL;
+       struct ldb_dn *rodc_dn, *krbtgt_link_dn;
        int ret;
        const char *rodc_attrs[] = { "msDS-KrbTgtLink", "msDS-NeverRevealGroup", "msDS-RevealOnDemandGroup", NULL };
        const char *obj_attrs[] = { "tokenGroups", "objectSid", "UserAccountControl", "msDS-KrbTgtLinkBL", NULL };
index 2ab1a2b..688702b 100644 (file)
@@ -4211,10 +4211,10 @@ static NTSTATUS check_ft_info(TALLOC_CTX *mem_ctx,
        struct ForestTrustInfoRecord *trec;
        const char *dns_name;
        const char *nb_name;
-       struct dom_sid *sid;
-       const char *tname;
+       struct dom_sid *sid = NULL;
+       const char *tname = NULL;
        size_t dns_len;
-       size_t tlen;
+       size_t tlen = 0;
        NTSTATUS nt_status = NT_STATUS_OK;
        uint32_t new_fti_idx;
        uint32_t i;
@@ -4224,7 +4224,7 @@ static NTSTATUS check_ft_info(TALLOC_CTX *mem_ctx,
        bool sid_conflict;
        bool nb_conflict;
        bool exclusion;
-       bool ex_rule;
+       bool ex_rule = false;
        int ret;
 
        for (new_fti_idx = 0; new_fti_idx < new_fti->count; new_fti_idx++) {
index 1a57bd2..c3e9908 100644 (file)
@@ -569,8 +569,8 @@ static struct bkrp_BackupKey *createRestoreGUIDStruct(struct torture_context *tc
        struct bkrp_client_side_wrapped data;
        DATA_BLOB *xs;
        DATA_BLOB *sec;
-       DATA_BLOB *enc_sec;
-       DATA_BLOB *enc_xs;
+       DATA_BLOB *enc_sec = NULL;
+       DATA_BLOB *enc_xs = NULL;
        DATA_BLOB *blob2;
        DATA_BLOB enc_sec_reverted;
        DATA_BLOB des3_key;
index 0737a0e..e5032a8 100644 (file)
@@ -2804,8 +2804,8 @@ static bool test_CreateTrustedDomainEx_common(struct dcerpc_pipe *p,
        struct lsa_CreateTrustedDomainEx r;
        struct lsa_CreateTrustedDomainEx2 r2;
        struct lsa_TrustDomainInfoInfoEx trustinfo;
-       struct lsa_TrustDomainInfoAuthInfoInternal *authinfo_internal;
-       struct lsa_TrustDomainInfoAuthInfo *authinfo;
+       struct lsa_TrustDomainInfoAuthInfoInternal *authinfo_internal = NULL;
+       struct lsa_TrustDomainInfoAuthInfo *authinfo = NULL;
        struct dom_sid **domsid;
        struct policy_handle *trustdom_handle;
        struct lsa_QueryTrustedDomainInfo q;
index eff1c7a..b5a76ec 100644 (file)
@@ -59,7 +59,7 @@ bool test_netlogon_ex_ops(struct dcerpc_pipe *p, struct torture_context *tctx,
        struct netr_UserSessionKey key;
        struct netr_LMSessionKey LMSessKey;
        uint32_t validation_levels[] = { 2, 3 };
-       struct netr_SamBaseInfo *base;
+       struct netr_SamBaseInfo *base = NULL;
        const char *crypto_alg = "";
        bool can_do_validation_6 = true;
 
index a20cf98..3e6b66d 100644 (file)
@@ -278,7 +278,7 @@ static bool test_QueryServiceObjectSecurity(struct torture_context *tctx,
        struct policy_handle h, s;
        struct dcerpc_binding_handle *b = p->binding_handle;
 
-       uint8_t *buffer;
+       uint8_t *buffer = NULL;
        uint32_t needed;
 
        enum ndr_err_code ndr_err;
index 2bd7443..cc49c5d 100644 (file)
@@ -991,7 +991,7 @@ static bool torture_winbind_struct_lookup_name_sid(struct torture_context *tortu
        struct winbindd_request req;
        struct winbindd_response rep;
        const char *invalid_sid = "S-0-0-7";
-       char *domain;
+       char *domain = NULL;
        const char *invalid_user = "noone";
        char *invalid_name;
        bool strict = torture_setting_bool(torture, "strict mode", false);
index 29ed5a6..2801968 100644 (file)
@@ -247,7 +247,7 @@ static void winbind_task_init(struct task_server *task)
        struct wbsrv_service *service;
        struct wbsrv_listen_socket *listen_socket;
        char *errstring;
-       struct dom_sid *primary_sid;
+       struct dom_sid *primary_sid = NULL;
        bool ok;
 
        task_server_set_title(task, "task[winbind]");