mirror of
https://github.com/samba-team/samba.git
synced 2025-03-27 22:50:26 +03:00
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
This commit is contained in:
parent
b3385f74db
commit
38628b1e32
@ -411,7 +411,7 @@ _PUBLIC_ NTSTATUS cli_credentials_set_stored_principal(struct cli_credentials *c
|
||||
{
|
||||
NTSTATUS status;
|
||||
char *filter;
|
||||
char *error_string;
|
||||
char *error_string = NULL;
|
||||
/* Bleh, nasty recursion issues: We are setting a machine
|
||||
* account here, so we don't want the 'pending' flag around
|
||||
* any more */
|
||||
@ -424,7 +424,9 @@ _PUBLIC_ NTSTATUS cli_credentials_set_stored_principal(struct cli_credentials *c
|
||||
SECRETS_PRINCIPALS_DN, filter,
|
||||
0, NULL, &error_string);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
DEBUG(1, ("Could not find %s principal in secrets database: %s: %s\n", serviceprincipal, nt_errstr(status), error_string));
|
||||
DEBUG(1, ("Could not find %s principal in secrets database: %s: %s\n",
|
||||
serviceprincipal, nt_errstr(status),
|
||||
error_string ? error_string : "<no error>"));
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
@ -635,7 +635,7 @@ static int map_subtree_select_local_list(struct ldb_module *module, void *mem_ct
|
||||
/* Generate new list of subtrees */
|
||||
j = 0;
|
||||
for (i = 0; i < tree->u.list.num_elements; i++) {
|
||||
struct ldb_parse_tree *child;
|
||||
struct ldb_parse_tree *child = NULL;
|
||||
ret = map_subtree_select_local(module, *new, &child, tree->u.list.elements[i]);
|
||||
if (ret) {
|
||||
talloc_free(*new);
|
||||
|
@ -722,7 +722,7 @@ static void ctdbd_socket_handler(struct tevent_context *event_ctx,
|
||||
{
|
||||
struct ctdbd_connection *conn = talloc_get_type_abort(
|
||||
private_data, struct ctdbd_connection);
|
||||
struct ctdb_req_header *hdr;
|
||||
struct ctdb_req_header *hdr = NULL;
|
||||
NTSTATUS status;
|
||||
|
||||
status = ctdb_read_packet(conn->fd, talloc_tos(), &hdr);
|
||||
@ -1304,7 +1304,7 @@ char *ctdbd_dbpath(struct ctdbd_connection *conn,
|
||||
{
|
||||
NTSTATUS status;
|
||||
TDB_DATA data;
|
||||
int32_t cstatus;
|
||||
int32_t cstatus = 0;
|
||||
|
||||
data.dptr = (uint8_t*)&db_id;
|
||||
data.dsize = sizeof(db_id);
|
||||
@ -1557,7 +1557,7 @@ NTSTATUS ctdbd_traverse(uint32_t db_id,
|
||||
}
|
||||
|
||||
while (True) {
|
||||
struct ctdb_req_header *hdr;
|
||||
struct ctdb_req_header *hdr = NULL;
|
||||
struct ctdb_req_message *m;
|
||||
struct ctdb_rec_data *d;
|
||||
|
||||
|
@ -240,7 +240,7 @@ WERROR NetFileEnum_r(struct libnetapi_ctx *ctx,
|
||||
}
|
||||
|
||||
for (i=0; i < info_ctr.ctr.ctr2->count; i++) {
|
||||
union srvsvc_NetFileInfo _i;
|
||||
union srvsvc_NetFileInfo _i = {0};
|
||||
switch (r->in.level) {
|
||||
case 2:
|
||||
_i.info2 = &info_ctr.ctr.ctr2->array[i];
|
||||
|
@ -386,7 +386,7 @@ WERROR NetShareEnum_r(struct libnetapi_ctx *ctx,
|
||||
}
|
||||
|
||||
for (i=0; i < info_ctr.ctr.ctr1->count; i++) {
|
||||
union srvsvc_NetShareInfo _i;
|
||||
union srvsvc_NetShareInfo _i = {0};
|
||||
switch (r->in.level) {
|
||||
case 0:
|
||||
_i.info0 = &info_ctr.ctr.ctr0->array[i];
|
||||
|
@ -1303,7 +1303,7 @@ static NTSTATUS ipasam_create_dom_group(struct pdb_methods *pdb_methods,
|
||||
{
|
||||
NTSTATUS status;
|
||||
struct ldapsam_privates *ldap_state;
|
||||
char *dn;
|
||||
char *dn = NULL;
|
||||
uint32_t has_objectclass = 0;
|
||||
|
||||
ldap_state = (struct ldapsam_privates *)(pdb_methods->private_data);
|
||||
|
@ -274,7 +274,7 @@ static int net_registry_createkey(struct net_context *c, int argc,
|
||||
{
|
||||
WERROR werr;
|
||||
enum winreg_CreateAction action;
|
||||
char *subkeyname;
|
||||
char *subkeyname = NULL;
|
||||
struct registry_key *hivekey = NULL;
|
||||
struct registry_key *subkey = NULL;
|
||||
TALLOC_CTX *ctx = talloc_stackframe();
|
||||
@ -333,7 +333,7 @@ static int net_registry_deletekey_internal(struct net_context *c, int argc,
|
||||
bool recursive)
|
||||
{
|
||||
WERROR werr;
|
||||
char *subkeyname;
|
||||
char *subkeyname = NULL;
|
||||
struct registry_key *hivekey = NULL;
|
||||
TALLOC_CTX *ctx = talloc_stackframe();
|
||||
int ret = -1;
|
||||
|
@ -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,
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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),
|
||||
|
@ -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? */
|
||||
|
Loading…
x
Reference in New Issue
Block a user