summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2015-03-03 08:48:00 +0100
committerVolker Lendecke <vl@samba.org>2015-03-03 13:14:53 +0100
commit38628b1e32cb480cbd0cef57a34a9fe0216f344c (patch)
treed39fb17f31ef0f0c0f42f39c829d3d050a7e0f7e /source4
parentb3385f74db54bd8a07a0be5515151b633c067da4 (diff)
downloadsamba-38628b1e32cb480cbd0cef57a34a9fe0216f344c.tar.gz
Fix the O3 developer build
Different gcc versions complain at different places Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Mar 3 13:14:53 CET 2015 on sn-devel-104
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/kcc/kcc_topology.c9
-rw-r--r--source4/heimdal/lib/krb5/fcache.c11
-rw-r--r--source4/lib/http/http_auth.c4
-rw-r--r--source4/libnet/userman.c2
-rw-r--r--source4/rpc_server/samr/dcesrv_samr.c25
-rw-r--r--source4/torture/rpc/samsync.c2
-rw-r--r--source4/torture/rpc/spoolss.c15
-rw-r--r--source4/torture/winbind/struct_based.c2
8 files changed, 40 insertions, 30 deletions
diff --git a/source4/dsdb/kcc/kcc_topology.c b/source4/dsdb/kcc/kcc_topology.c
index 2836199a69e..82ef665601c 100644
--- a/source4/dsdb/kcc/kcc_topology.c
+++ b/source4/dsdb/kcc/kcc_topology.c
@@ -2790,7 +2790,7 @@ static NTSTATUS kcctpl_create_connection(struct kccsrv_service *service,
"transportType", "schedule", "options",
"enabledConnection", NULL };
unsigned int i, valid_connections;
- struct GUID_list keep_connections;
+ struct GUID_list keep_connections = {0};
tmp_ctx = talloc_new(service);
NT_STATUS_HAVE_NO_MEMORY(tmp_ctx);
@@ -3299,7 +3299,8 @@ static NTSTATUS kcctpl_create_connections(struct kccsrv_service *service,
struct GUID other_site_id;
struct kcctpl_vertex *other_site_vertex;
struct ldb_result *res;
- struct ldb_message *transport, *r_bridgehead, *l_bridgehead;
+ struct ldb_message *transport, *r_bridgehead;
+ struct ldb_message *l_bridgehead = NULL;
uint8_t schedule[84];
uint32_t first_available, j, interval;
@@ -3532,8 +3533,8 @@ NTSTATUS kcctpl_test(struct kccsrv_service *service)
{
NTSTATUS status;
TALLOC_CTX *tmp_ctx = talloc_new(service);
- struct GUID_list keep;
- bool all_connected;
+ struct GUID_list keep = {0};
+ bool all_connected = false;
DEBUG(5, ("Testing kcctpl_create_intersite_connections\n"));
status = kcctpl_create_intersite_connections(service, tmp_ctx, &keep,
diff --git a/source4/heimdal/lib/krb5/fcache.c b/source4/heimdal/lib/krb5/fcache.c
index 781d4f00407..a9e8327328c 100644
--- a/source4/heimdal/lib/krb5/fcache.c
+++ b/source4/heimdal/lib/krb5/fcache.c
@@ -420,7 +420,7 @@ fcc_initialize(krb5_context context,
{
krb5_fcache *f = FCACHE(id);
int ret = 0;
- int fd;
+ int fd = 0;
if (f == NULL)
return krb5_einval(context, 2);
@@ -500,7 +500,7 @@ fcc_store_cred(krb5_context context,
krb5_creds *creds)
{
int ret;
- int fd;
+ int fd = 0;
ret = fcc_open(context, id, &fd, O_WRONLY | O_APPEND | O_BINARY | O_CLOEXEC, 0);
if(ret)
@@ -541,7 +541,7 @@ init_fcc (krb5_context context,
int *ret_fd,
krb5_deltat *kdc_offset)
{
- int fd;
+ int fd = 0;
int8_t pvno, tag;
krb5_storage *sp;
krb5_error_code ret;
@@ -973,7 +973,8 @@ fcc_move(krb5_context context, krb5_ccache from, krb5_ccache to)
} else if (ret && errno == EXDEV) {
/* make a copy and delete the orignal */
krb5_ssize_t sz1, sz2;
- int fd1, fd2;
+ int fd1;
+ int fd2 = 0;
char buf[BUFSIZ];
ret = fcc_open(context, from, &fd1, O_RDONLY | O_BINARY | O_CLOEXEC, 0);
@@ -1077,7 +1078,7 @@ fcc_get_kdc_offset(krb5_context context, krb5_ccache id, krb5_deltat *kdc_offset
{
krb5_error_code ret;
krb5_storage *sp = NULL;
- int fd;
+ int fd = 0;
ret = init_fcc(context, id, &sp, &fd, kdc_offset);
if (sp)
krb5_storage_free(sp);
diff --git a/source4/lib/http/http_auth.c b/source4/lib/http/http_auth.c
index 2bf4392e8f2..d846ec2a048 100644
--- a/source4/lib/http/http_auth.c
+++ b/source4/lib/http/http_auth.c
@@ -166,7 +166,7 @@ struct tevent_req *http_send_auth_request_send(TALLOC_CTX *mem_ctx,
struct tevent_req *subreq;
struct http_auth_state *state;
NTSTATUS status;
- struct http_request *auth_request;
+ struct http_request *auth_request = NULL;
struct http_request *request_to_send;
req = tevent_req_create(mem_ctx, &state, struct http_auth_state);
@@ -301,7 +301,7 @@ static void http_send_auth_request_done2(struct tevent_req *subreq)
struct tevent_req *req;
struct http_auth_state *state;
struct http_request *auth_response;
- struct http_request *auth_request;
+ struct http_request *auth_request = NULL;
struct http_request *request_to_send;
req = tevent_req_callback_data(subreq, struct tevent_req);
diff --git a/source4/libnet/userman.c b/source4/libnet/userman.c
index 39be78f6707..9e76364992c 100644
--- a/source4/libnet/userman.c
+++ b/source4/libnet/userman.c
@@ -756,7 +756,7 @@ static void continue_usermod_user_queried(struct tevent_req *subreq)
struct composite_context *c;
struct usermod_state *s;
union samr_UserInfo *i;
- uint16_t level;
+ uint16_t level = 0;
c = tevent_req_callback_data(subreq, struct composite_context);
s = talloc_get_type(c->private_data, struct usermod_state);
diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c
index c0bec437c2c..bf2174c771b 100644
--- a/source4/rpc_server/samr/dcesrv_samr.c
+++ b/source4/rpc_server/samr/dcesrv_samr.c
@@ -1239,13 +1239,16 @@ static NTSTATUS dcesrv_samr_CreateUser(struct dcesrv_call_state *dce_call, TALLO
/* a simple wrapper around samr_CreateUser2 works nicely */
- r2.in.domain_handle = r->in.domain_handle;
- r2.in.account_name = r->in.account_name;
- r2.in.acct_flags = ACB_NORMAL;
- r2.in.access_mask = r->in.access_mask;
- r2.out.user_handle = r->out.user_handle;
- r2.out.access_granted = &access_granted;
- r2.out.rid = r->out.rid;
+
+ r2 = (struct samr_CreateUser2) {
+ .in.domain_handle = r->in.domain_handle,
+ .in.account_name = r->in.account_name,
+ .in.acct_flags = ACB_NORMAL,
+ .in.access_mask = r->in.access_mask,
+ .out.user_handle = r->out.user_handle,
+ .out.access_granted = &access_granted,
+ .out.rid = r->out.rid
+ };
return dcesrv_samr_CreateUser2(dce_call, mem_ctx, &r2);
}
@@ -4007,9 +4010,11 @@ static NTSTATUS dcesrv_samr_QueryUserInfo2(struct dcesrv_call_state *dce_call, T
struct samr_QueryUserInfo r1;
NTSTATUS status;
- r1.in.user_handle = r->in.user_handle;
- r1.in.level = r->in.level;
- r1.out.info = r->out.info;
+ r1 = (struct samr_QueryUserInfo) {
+ .in.user_handle = r->in.user_handle,
+ .in.level = r->in.level,
+ .out.info = r->out.info
+ };
status = dcesrv_samr_QueryUserInfo(dce_call, mem_ctx, &r1);
diff --git a/source4/torture/rpc/samsync.c b/source4/torture/rpc/samsync.c
index 2c18e0d502e..e71faf899a5 100644
--- a/source4/torture/rpc/samsync.c
+++ b/source4/torture/rpc/samsync.c
@@ -463,7 +463,7 @@ static bool samsync_handle_user(struct torture_context *tctx, TALLOC_CTX *mem_ct
{
uint32_t rid = delta->delta_id_union.rid;
struct netr_DELTA_USER *user = delta->delta_union.user;
- struct netr_SamInfo3 *info3;
+ struct netr_SamInfo3 *info3 = NULL;
struct samr_Password lm_hash;
struct samr_Password nt_hash;
struct samr_Password *lm_hash_p = NULL;
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 23f501d7401..ebe7c0939f0 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -4118,9 +4118,12 @@ static bool test_GetPrinterData_list(struct torture_context *tctx,
int i;
for (i=0; i < ARRAY_SIZE(list); i++) {
- enum winreg_Type type, type_ex;
- uint8_t *data, *data_ex;
- uint32_t needed, needed_ex;
+ enum winreg_Type type = REG_NONE;
+ enum winreg_Type type_ex= REG_NONE;
+ uint8_t *data;
+ uint8_t *data_ex = NULL;
+ uint32_t needed;
+ uint32_t needed_ex = 0;
torture_assert(tctx, test_GetPrinterData(tctx, b, &ctx->server_handle, list[i], &type, &data, &needed),
talloc_asprintf(tctx, "GetPrinterData failed on %s\n", list[i]));
@@ -6064,9 +6067,9 @@ static bool test_GetChangeID_PrinterDataEx(struct torture_context *tctx,
struct policy_handle *handle,
uint32_t *change_id)
{
- enum winreg_Type type;
- uint8_t *data;
- uint32_t needed;
+ enum winreg_Type type = REG_NONE;
+ uint8_t *data = NULL;
+ uint32_t needed = 0;
torture_assert(tctx,
test_GetPrinterDataEx(tctx, p, handle, "PrinterDriverData", "ChangeID", &type, &data, &needed),
diff --git a/source4/torture/winbind/struct_based.c b/source4/torture/winbind/struct_based.c
index cc49c5d7c04..0096fefcbbd 100644
--- a/source4/torture/winbind/struct_based.c
+++ b/source4/torture/winbind/struct_based.c
@@ -896,7 +896,7 @@ static bool parse_domain_user(struct torture_context *torture,
fstring user)
{
char *p = strchr(domuser, winbind_separator(torture));
- char *dom;
+ char *dom = NULL;
if (!p) {
/* Maybe it was a UPN? */