[PATCH] Fix the developer O3 build
Volker Lendecke
Volker.Lendecke at SerNet.DE
Wed Feb 25 05:20:54 MST 2015
Hi!
Review&push would be appreciated.
Thanks,
Volker
--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
From 6bce6a00fcc7c04b25eda02ea584a52096e24cd1 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Wed, 25 Feb 2015 12:19:40 +0000
Subject: [PATCH 1/2] heimdal: Fix the developer O3 build
Signed-off-by: Volker Lendecke <vl at samba.org>
---
source4/heimdal/lib/krb5/store.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source4/heimdal/lib/krb5/store.c b/source4/heimdal/lib/krb5/store.c
index 3aeb8d6..17de78e 100644
--- a/source4/heimdal/lib/krb5/store.c
+++ b/source4/heimdal/lib/krb5/store.c
@@ -503,7 +503,7 @@ KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_ret_int16(krb5_storage *sp,
int16_t *value)
{
- int32_t v;
+ int32_t v = 0;
int ret;
ret = krb5_ret_int(sp, &v, 2);
if(ret)
--
1.7.9.5
From f74112100a6c876452bc992cbb450952284cb59b Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Wed, 25 Feb 2015 12:19:44 +0000
Subject: [PATCH 2/2] Fix the developer O3 build
Signed-off-by: Volker Lendecke <vl at samba.org>
---
examples/libsmbclient/testacl.c | 2 +-
source3/utils/regedit.c | 2 +-
source3/utils/regedit_list.c | 2 +-
source3/utils/smbfilter.c | 3 ++-
source4/auth/gensec/gensec_gssapi.c | 4 ++--
source4/dsdb/dns/dns_update.c | 3 ++-
source4/dsdb/kcc/kcc_drs_replica_info.c | 2 +-
source4/dsdb/repl/drepl_out_helpers.c | 2 +-
source4/dsdb/samdb/ldb_modules/operational.c | 2 +-
source4/dsdb/samdb/ldb_modules/samldb.c | 3 ++-
source4/dsdb/samdb/ldb_modules/schema_util.c | 2 +-
source4/lib/registry/patchfile_dotreg.c | 4 ++--
source4/lib/registry/regf.c | 4 ++--
source4/ntvfs/ipc/ipc_rap.c | 8 ++++----
source4/rpc_server/backupkey/dcesrv_backupkey.c | 2 +-
source4/rpc_server/drsuapi/getncchanges.c | 3 ++-
source4/rpc_server/lsa/dcesrv_lsa.c | 8 ++++----
source4/torture/rpc/backupkey.c | 4 ++--
source4/torture/rpc/lsa.c | 4 ++--
source4/torture/rpc/schannel.c | 2 +-
source4/torture/rpc/svcctl.c | 2 +-
source4/torture/winbind/struct_based.c | 2 +-
source4/winbind/wb_server.c | 2 +-
23 files changed, 38 insertions(+), 34 deletions(-)
diff --git a/examples/libsmbclient/testacl.c b/examples/libsmbclient/testacl.c
index b602c5b..99a6d13 100644
--- a/examples/libsmbclient/testacl.c
+++ b/examples/libsmbclient/testacl.c
@@ -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;
diff --git a/source3/utils/regedit.c b/source3/utils/regedit.c
index bff23ec..21437f4 100644
--- a/source3/utils/regedit.c
+++ b/source3/utils/regedit.c
@@ -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;
diff --git a/source3/utils/regedit_list.c b/source3/utils/regedit_list.c
index c2b3705..8ee2d5e 100644
--- a/source3/utils/regedit_list.c
+++ b/source3/utils/regedit_list.c
@@ -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;
diff --git a/source3/utils/smbfilter.c b/source3/utils/smbfilter.c
index ff966a8..1f55ec8 100644
--- a/source3/utils/smbfilter.c
+++ b/source3/utils/smbfilter.c
@@ -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) {
diff --git a/source4/auth/gensec/gensec_gssapi.c b/source4/auth/gensec/gensec_gssapi.c
index 2bc6422..c168d8a 100644
--- a/source4/auth/gensec/gensec_gssapi.c
+++ b/source4/auth/gensec/gensec_gssapi.c
@@ -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";
diff --git a/source4/dsdb/dns/dns_update.c b/source4/dsdb/dns/dns_update.c
index aa617c6..972459a 100644
--- a/source4/dsdb/dns/dns_update.c
+++ b/source4/dsdb/dns/dns_update.c
@@ -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;
diff --git a/source4/dsdb/kcc/kcc_drs_replica_info.c b/source4/dsdb/kcc/kcc_drs_replica_info.c
index 52c36ca..ef64f82 100644
--- a/source4/dsdb/kcc/kcc_drs_replica_info.c
+++ b/source4/dsdb/kcc/kcc_drs_replica_info.c
@@ -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]
diff --git a/source4/dsdb/repl/drepl_out_helpers.c b/source4/dsdb/repl/drepl_out_helpers.c
index 3054323..c8a28ac 100644
--- a/source4/dsdb/repl/drepl_out_helpers.c
+++ b/source4/dsdb/repl/drepl_out_helpers.c
@@ -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);
diff --git a/source4/dsdb/samdb/ldb_modules/operational.c b/source4/dsdb/samdb/ldb_modules/operational.c
index f77474f..66dfca0 100644
--- a/source4/dsdb/samdb/ldb_modules/operational.c
+++ b/source4/dsdb/samdb/ldb_modules/operational.c
@@ -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;
diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c
index 664ace0..e3a7db2 100644
--- a/source4/dsdb/samdb/ldb_modules/samldb.c
+++ b/source4/dsdb/samdb/ldb_modules/samldb.c
@@ -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;
diff --git a/source4/dsdb/samdb/ldb_modules/schema_util.c b/source4/dsdb/samdb/ldb_modules/schema_util.c
index 86c21f0..c6d8ade 100644
--- a/source4/dsdb/samdb/ldb_modules/schema_util.c
+++ b/source4/dsdb/samdb/ldb_modules/schema_util.c
@@ -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);
diff --git a/source4/lib/registry/patchfile_dotreg.c b/source4/lib/registry/patchfile_dotreg.c
index c4409dc..f537b97 100644
--- a/source4/lib/registry/patchfile_dotreg.c
+++ b/source4/lib/registry/patchfile_dotreg.c
@@ -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);
diff --git a/source4/lib/registry/regf.c b/source4/lib/registry/regf.c
index 8495e53..4b7145e 100644
--- a/source4/lib/registry/regf.c
+++ b/source4/lib/registry/regf.c
@@ -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);
diff --git a/source4/ntvfs/ipc/ipc_rap.c b/source4/ntvfs/ipc/ipc_rap.c
index 259dccc..9ddde5e 100644
--- a/source4/ntvfs/ipc/ipc_rap.c
+++ b/source4/ntvfs/ipc/ipc_rap.c
@@ -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);
diff --git a/source4/rpc_server/backupkey/dcesrv_backupkey.c b/source4/rpc_server/backupkey/dcesrv_backupkey.c
index bef4c93..9dfd7a9 100644
--- a/source4/rpc_server/backupkey/dcesrv_backupkey.c
+++ b/source4/rpc_server/backupkey/dcesrv_backupkey.c
@@ -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;
diff --git a/source4/rpc_server/drsuapi/getncchanges.c b/source4/rpc_server/drsuapi/getncchanges.c
index 9a405fd..d755306 100644
--- a/source4/rpc_server/drsuapi/getncchanges.c
+++ b/source4/rpc_server/drsuapi/getncchanges.c
@@ -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 };
diff --git a/source4/rpc_server/lsa/dcesrv_lsa.c b/source4/rpc_server/lsa/dcesrv_lsa.c
index 2ab1a2b..688702b 100644
--- a/source4/rpc_server/lsa/dcesrv_lsa.c
+++ b/source4/rpc_server/lsa/dcesrv_lsa.c
@@ -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++) {
diff --git a/source4/torture/rpc/backupkey.c b/source4/torture/rpc/backupkey.c
index 1a57bd2..c3e9908 100644
--- a/source4/torture/rpc/backupkey.c
+++ b/source4/torture/rpc/backupkey.c
@@ -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;
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c
index 0737a0e..e5032a8 100644
--- a/source4/torture/rpc/lsa.c
+++ b/source4/torture/rpc/lsa.c
@@ -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;
diff --git a/source4/torture/rpc/schannel.c b/source4/torture/rpc/schannel.c
index eff1c7a..b5a76ec 100644
--- a/source4/torture/rpc/schannel.c
+++ b/source4/torture/rpc/schannel.c
@@ -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;
diff --git a/source4/torture/rpc/svcctl.c b/source4/torture/rpc/svcctl.c
index a20cf98..3e6b66d 100644
--- a/source4/torture/rpc/svcctl.c
+++ b/source4/torture/rpc/svcctl.c
@@ -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;
diff --git a/source4/torture/winbind/struct_based.c b/source4/torture/winbind/struct_based.c
index 2bd7443..cc49c5d 100644
--- a/source4/torture/winbind/struct_based.c
+++ b/source4/torture/winbind/struct_based.c
@@ -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);
diff --git a/source4/winbind/wb_server.c b/source4/winbind/wb_server.c
index 29ed5a6..2801968 100644
--- a/source4/winbind/wb_server.c
+++ b/source4/winbind/wb_server.c
@@ -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]");
--
1.7.9.5
More information about the samba-technical
mailing list