summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/auth/gensec/gensec_gssapi.c4
-rw-r--r--source4/auth/gensec/socket.c2
-rw-r--r--source4/dsdb/samdb/ldb_modules/rootdse.c4
-rw-r--r--source4/dsdb/samdb/ldb_modules/schema.c9
-rw-r--r--source4/ldap_server/ldap_backend.c2
-rw-r--r--source4/ldap_server/ldap_bind.c4
-rw-r--r--source4/lib/appweb/mpr/var.c2
-rw-r--r--source4/lib/ldb/modules/ldb_map_outbound.c4
-rw-r--r--source4/lib/ldb/modules/operational.c2
-rw-r--r--source4/lib/tdb/common/io.c2
-rw-r--r--source4/lib/tdb/common/lock.c2
-rw-r--r--source4/lib/tls/tls.c6
-rw-r--r--source4/libcli/raw/rawfile.c2
-rw-r--r--source4/libcli/smb2/smb2.h4
-rw-r--r--source4/libcli/wrepl/winsrepl.c9
-rw-r--r--source4/librpc/ndr/ndr_basic.c6
-rw-r--r--source4/librpc/ndr/ndr_spoolss_buf.c6
-rw-r--r--source4/ntvfs/nbench/vfs_nbench.c2
-rw-r--r--source4/smb_server/smb/receive.c3
-rw-r--r--source4/smb_server/smb2/smb2_server.h4
-rw-r--r--source4/torture/basic/base.c2
-rw-r--r--source4/torture/raw/acls.c10
-rw-r--r--source4/torture/raw/qfileinfo.c4
-rw-r--r--source4/torture/raw/read.c2
-rw-r--r--source4/torture/smb2/util.c4
-rw-r--r--source4/wrepl_server/wrepl_in_connection.c3
-rw-r--r--source4/wrepl_server/wrepl_scavenging.c11
-rw-r--r--source4/wrepl_server/wrepl_server.c5
28 files changed, 60 insertions, 60 deletions
diff --git a/source4/auth/gensec/gensec_gssapi.c b/source4/auth/gensec/gensec_gssapi.c
index 3bf14505f5..d9f6edc7d7 100644
--- a/source4/auth/gensec/gensec_gssapi.c
+++ b/source4/auth/gensec/gensec_gssapi.c
@@ -761,8 +761,8 @@ static NTSTATUS gensec_gssapi_wrap(struct gensec_security *gensec_security,
size_t max_wrapped_size = gensec_gssapi_max_wrapped_size(gensec_security);
if (max_wrapped_size < out->length) {
DEBUG(1, ("gensec_gssapi_wrap: when wrapped, INPUT data (%u) is grew to be larger than SASL negotiated maximum output size (%u > %u)\n",
- in->length,
- out->length,
+ (unsigned)in->length,
+ (unsigned)out->length,
(unsigned int)max_wrapped_size));
return NT_STATUS_INVALID_PARAMETER;
}
diff --git a/source4/auth/gensec/socket.c b/source4/auth/gensec/socket.c
index 3567bf801d..cf7b196f9d 100644
--- a/source4/auth/gensec/socket.c
+++ b/source4/auth/gensec/socket.c
@@ -123,7 +123,7 @@ NTSTATUS gensec_unwrap_packets(struct gensec_security *gensec_security,
if (wrapped.length > (in->length - 4)) {
DEBUG(0, ("Asked to unwrap packed of bogus length %d > %d! How did we get this?!\n",
- wrapped.length, in->length - 4));
+ (int)wrapped.length, (int)(in->length - 4)));
return NT_STATUS_INTERNAL_ERROR;
}
diff --git a/source4/dsdb/samdb/ldb_modules/rootdse.c b/source4/dsdb/samdb/ldb_modules/rootdse.c
index ab9c43577c..ba0dc5645c 100644
--- a/source4/dsdb/samdb/ldb_modules/rootdse.c
+++ b/source4/dsdb/samdb/ldb_modules/rootdse.c
@@ -121,7 +121,7 @@ static int rootdse_add_dynamic(struct ldb_module *module, struct ldb_message *ms
int ret = ldb_sequence_number(module->ldb, &seq_num);
if (ret == LDB_SUCCESS) {
if (ldb_msg_add_fmt(msg, "highestCommittedUSN",
- "%llu", seq_num) != 0) {
+ "%llu", (unsigned long long)seq_num) != 0) {
goto failed;
}
}
@@ -260,7 +260,7 @@ static int rootdse_register_partition(struct ldb_module *module, struct ldb_requ
return LDB_ERR_OPERATIONS_ERROR;
}
- list[priv->num_partitions] = talloc_reference(list, req->op.reg_partition.dn);
+ list[priv->num_partitions] = ldb_dn_copy(list, req->op.reg_partition.dn);
if (!list[priv->num_partitions]) {
return LDB_ERR_OPERATIONS_ERROR;
}
diff --git a/source4/dsdb/samdb/ldb_modules/schema.c b/source4/dsdb/samdb/ldb_modules/schema.c
index 36b7916e95..95330e7e8c 100644
--- a/source4/dsdb/samdb/ldb_modules/schema.c
+++ b/source4/dsdb/samdb/ldb_modules/schema.c
@@ -1126,9 +1126,6 @@ static int schema_add(struct ldb_module *module, struct ldb_request *req)
static int schema_modify(struct ldb_module *module, struct ldb_request *req)
{
- struct ldb_handle *h;
- struct schema_context *sctx;
-
if (ldb_dn_is_special(req->op.mod.message->dn)) { /* do not manipulate our control entries */
return ldb_next_request(module, req);
}
@@ -1138,9 +1135,6 @@ static int schema_modify(struct ldb_module *module, struct ldb_request *req)
static int schema_delete(struct ldb_module *module, struct ldb_request *req)
{
- struct ldb_handle *h;
- struct schema_context *sctx;
-
if (ldb_dn_is_special(req->op.del.dn)) { /* do not manipulate our control entries */
return ldb_next_request(module, req);
}
@@ -1152,9 +1146,6 @@ static int schema_delete(struct ldb_module *module, struct ldb_request *req)
static int schema_rename(struct ldb_module *module, struct ldb_request *req)
{
- struct ldb_handle *h;
- struct schema_context *sctx;
-
if (ldb_dn_is_special(req->op.rename.olddn) &&
ldb_dn_is_special(req->op.rename.newdn)) { /* do not manipulate our control entries */
return ldb_next_request(module, req);
diff --git a/source4/ldap_server/ldap_backend.c b/source4/ldap_server/ldap_backend.c
index bbb16a2e90..e8e3e293b7 100644
--- a/source4/ldap_server/ldap_backend.c
+++ b/source4/ldap_server/ldap_backend.c
@@ -578,7 +578,7 @@ static NTSTATUS ldapsrv_ModifyDNRequest(struct ldapsrv_call *call)
struct ldapsrv_reply *modifydn_r;
void *local_ctx;
struct ldb_context *samdb = call->conn->ldb;
- struct ldb_dn *olddn, *newdn, *newrdn;
+ struct ldb_dn *olddn, *newdn=NULL, *newrdn;
struct ldb_dn *parentdn = NULL;
const char *errstr = NULL;
int result = LDAP_SUCCESS;
diff --git a/source4/ldap_server/ldap_bind.c b/source4/ldap_server/ldap_bind.c
index fe23d55d1d..9736def3bf 100644
--- a/source4/ldap_server/ldap_bind.c
+++ b/source4/ldap_server/ldap_bind.c
@@ -117,7 +117,7 @@ static NTSTATUS ldapsrv_BindSASL(struct ldapsrv_call *call)
struct ldap_BindResponse *resp;
struct ldapsrv_connection *conn;
int result = 0;
- const char *errstr;
+ const char *errstr=NULL;
NTSTATUS status = NT_STATUS_OK;
DEBUG(10, ("BindSASL dn: %s\n",req->dn));
@@ -200,7 +200,7 @@ static NTSTATUS ldapsrv_BindSASL(struct ldapsrv_call *call)
result = LDAP_SASL_BIND_IN_PROGRESS;
errstr = NULL;
} else if (NT_STATUS_IS_OK(status)) {
- struct auth_session_info *old_session_info;
+ struct auth_session_info *old_session_info=NULL;
struct ldapsrv_sasl_context *ctx;
result = LDAP_SUCCESS;
diff --git a/source4/lib/appweb/mpr/var.c b/source4/lib/appweb/mpr/var.c
index 011d668460..11ac712065 100644
--- a/source4/lib/appweb/mpr/var.c
+++ b/source4/lib/appweb/mpr/var.c
@@ -1672,7 +1672,7 @@ void mprVarToString(char** out, int size, char *fmt, MprVar *obj)
#if BLD_GOAHEAD_WEBSERVER
mprAllocSprintf(out, size, "%d", (int) obj->integer64);
#else
- mprAllocSprintf(out, size, "%lld", obj->integer64);
+ mprAllocSprintf(out, size, "%lld", (long long)obj->integer64);
#endif
} else {
mprAllocSprintf(out, size, fmt, obj->integer64);
diff --git a/source4/lib/ldb/modules/ldb_map_outbound.c b/source4/lib/ldb/modules/ldb_map_outbound.c
index 229299288c..7d1649c6f5 100644
--- a/source4/lib/ldb/modules/ldb_map_outbound.c
+++ b/source4/lib/ldb/modules/ldb_map_outbound.c
@@ -79,7 +79,7 @@ static const char **map_attrs_collect_remote(struct ldb_module *module, void *me
const struct ldb_map_context *data = map_get_context(module);
const char **result;
const struct ldb_map_attribute *map;
- const char *name;
+ const char *name=NULL;
int i, j, last;
if (attrs == NULL)
@@ -277,7 +277,7 @@ static int ldb_msg_el_merge(struct ldb_module *module, struct ldb_message *local
{
const struct ldb_map_context *data = map_get_context(module);
const struct ldb_map_attribute *map = map_attr_find_remote(data, attr_name);
- struct ldb_message_element *el;
+ struct ldb_message_element *el=NULL;
/* Unknown attribute in remote message:
* skip, attribute was probably auto-generated */
diff --git a/source4/lib/ldb/modules/operational.c b/source4/lib/ldb/modules/operational.c
index b14d552e83..1e405355c4 100644
--- a/source4/lib/ldb/modules/operational.c
+++ b/source4/lib/ldb/modules/operational.c
@@ -180,7 +180,7 @@ static int add_uint64_element(struct ldb_message *msg, const char *attr, uint64_
return 0;
}
- if (ldb_msg_add_fmt(msg, attr, "%llu", v) != 0) {
+ if (ldb_msg_add_fmt(msg, attr, "%llu", (unsigned long long)v) != 0) {
return -1;
}
diff --git a/source4/lib/tdb/common/io.c b/source4/lib/tdb/common/io.c
index d0ef94831d..383023e88a 100644
--- a/source4/lib/tdb/common/io.c
+++ b/source4/lib/tdb/common/io.c
@@ -125,7 +125,7 @@ static int tdb_read(struct tdb_context *tdb, tdb_off_t off, void *buf,
/* Ensure ecode is set for log fn. */
tdb->ecode = TDB_ERR_IO;
TDB_LOG((tdb, TDB_DEBUG_FATAL,"tdb_read failed at %d len=%d ret=%d (%s) map_size=%d\n",
- off, len, ret, strerror(errno), tdb->map_size));
+ off, len, ret, strerror(errno), (int)tdb->map_size));
return TDB_ERRCODE(TDB_ERR_IO, -1);
}
}
diff --git a/source4/lib/tdb/common/lock.c b/source4/lib/tdb/common/lock.c
index 821fd35186..7594aedfcd 100644
--- a/source4/lib/tdb/common/lock.c
+++ b/source4/lib/tdb/common/lock.c
@@ -69,7 +69,7 @@ int tdb_brlock_len(struct tdb_context *tdb, tdb_off_t offset,
/* Ensure error code is set for log fun to examine. */
tdb->ecode = TDB_ERR_LOCK;
TDB_LOG((tdb, TDB_DEBUG_TRACE,"tdb_brlock failed (fd=%d) at offset %d rw_type=%d lck_type=%d len=%d\n",
- tdb->fd, offset, rw_type, lck_type, len));
+ tdb->fd, offset, rw_type, lck_type, (int)len));
}
return TDB_ERRCODE(TDB_ERR_LOCK, -1);
}
diff --git a/source4/lib/tls/tls.c b/source4/lib/tls/tls.c
index cd65e22bcb..8c885543ee 100644
--- a/source4/lib/tls/tls.c
+++ b/source4/lib/tls/tls.c
@@ -339,7 +339,7 @@ static NTSTATUS tls_socket_send(struct socket_context *sock,
return STATUS_MORE_ENTRIES;
}
if (ret < 0) {
- DEBUG(0,("gnutls_record_send of %d failed - %s\n", blob->length, gnutls_strerror(ret)));
+ DEBUG(0,("gnutls_record_send of %d failed - %s\n", (int)blob->length, gnutls_strerror(ret)));
return NT_STATUS_UNEXPECTED_NETWORK_ERROR;
}
*sendlen = ret;
@@ -419,11 +419,13 @@ struct tls_params *tls_initialise(TALLOC_CTX *mem_ctx)
if (dhpfile) {
gnutls_datum_t dhparms;
- dhparms.data = (uint8_t *)file_load(dhpfile, &dhparms.size, mem_ctx);
+ size_t size;
+ dhparms.data = (uint8_t *)file_load(dhpfile, &size, mem_ctx);
if (!dhparms.data) {
goto init_failed;
}
+ dhparms.size = size;
ret = gnutls_dh_params_import_pkcs3(params->dh_params, &dhparms, GNUTLS_X509_FMT_PEM);
if (ret < 0) goto init_failed;
diff --git a/source4/libcli/raw/rawfile.c b/source4/libcli/raw/rawfile.c
index f8b5e90e4b..3d2d407583 100644
--- a/source4/libcli/raw/rawfile.c
+++ b/source4/libcli/raw/rawfile.c
@@ -860,7 +860,7 @@ NTSTATUS smb_raw_chkpath(struct smbcli_tree *tree, union smb_chkpath *parms)
struct smbcli_request *smb_raw_flush_send(struct smbcli_tree *tree, union smb_flush *parms)
{
struct smbcli_request *req;
- uint16_t fnum;
+ uint16_t fnum=0;
switch (parms->generic.level) {
case RAW_FLUSH_FLUSH:
diff --git a/source4/libcli/smb2/smb2.h b/source4/libcli/smb2/smb2.h
index 070eaf54ab..586acaccf6 100644
--- a/source4/libcli/smb2/smb2.h
+++ b/source4/libcli/smb2/smb2.h
@@ -204,12 +204,12 @@ struct smb2_request {
uint16_t want_size = ((dynamic)?(size)+1:(size)); \
if (is_size < (size)) { \
DEBUG(0,("%s: buffer too small 0x%x. Expected 0x%x\n", \
- __location__, is_size, want_size)); \
+ __location__, (unsigned)is_size, (unsigned)want_size)); \
return NT_STATUS_BUFFER_TOO_SMALL; \
}\
if (field_size != want_size) { \
DEBUG(0,("%s: unexpected fixed body size 0x%x. Expected 0x%x\n", \
- __location__, field_size, want_size)); \
+ __location__, (unsigned)field_size, (unsigned)want_size)); \
return NT_STATUS_INVALID_PARAMETER; \
} \
} while (0)
diff --git a/source4/libcli/wrepl/winsrepl.c b/source4/libcli/wrepl/winsrepl.c
index 83cbe2877d..78ee2d165e 100644
--- a/source4/libcli/wrepl/winsrepl.c
+++ b/source4/libcli/wrepl/winsrepl.c
@@ -88,7 +88,8 @@ static NTSTATUS wrepl_finish_recv(void *private, DATA_BLOB packet_blob_in)
DATA_BLOB blob;
if (!req) {
- DEBUG(1,("Received unexpected WINS packet of length %u!\n", packet_blob_in.length));
+ DEBUG(1,("Received unexpected WINS packet of length %u!\n",
+ (unsigned)packet_blob_in.length));
return NT_STATUS_INVALID_NETWORK_RESPONSE;
}
@@ -108,7 +109,8 @@ static NTSTATUS wrepl_finish_recv(void *private, DATA_BLOB packet_blob_in)
}
if (DEBUGLVL(10)) {
- DEBUG(10,("Received WINS packet of length %u\n", packet_blob_in.length));
+ DEBUG(10,("Received WINS packet of length %u\n",
+ (unsigned)packet_blob_in.length));
NDR_PRINT_DEBUG(wrepl_packet, req->packet);
}
@@ -489,7 +491,8 @@ struct wrepl_request *wrepl_request_send(struct wrepl_socket *wrepl_socket,
}
if (DEBUGLVL(10)) {
- DEBUG(10,("Sending WINS packet of length %u\n", blob.length));
+ DEBUG(10,("Sending WINS packet of length %u\n",
+ (unsigned)blob.length));
NDR_PRINT_DEBUG(wrepl_packet, &wrap.packet);
}
diff --git a/source4/librpc/ndr/ndr_basic.c b/source4/librpc/ndr/ndr_basic.c
index f4ba786865..ed79f354fa 100644
--- a/source4/librpc/ndr/ndr_basic.c
+++ b/source4/librpc/ndr/ndr_basic.c
@@ -678,7 +678,7 @@ _PUBLIC_ void ndr_print_uint32(struct ndr_print *ndr, const char *name, uint32_t
_PUBLIC_ void ndr_print_udlong(struct ndr_print *ndr, const char *name, uint64_t v)
{
- ndr->print(ndr, "%-25s: 0x%016llx (%llu)", name, v, v);
+ ndr->print(ndr, "%-25s: 0x%016llx (%llu)", name, (unsigned long long)v, (unsigned long long)v);
}
_PUBLIC_ void ndr_print_udlongr(struct ndr_print *ndr, const char *name, uint64_t v)
@@ -688,7 +688,7 @@ _PUBLIC_ void ndr_print_udlongr(struct ndr_print *ndr, const char *name, uint64_
_PUBLIC_ void ndr_print_dlong(struct ndr_print *ndr, const char *name, int64_t v)
{
- ndr->print(ndr, "%-25s: 0x%016llx (%lld)", name, v, v);
+ ndr->print(ndr, "%-25s: 0x%016llx (%lld)", name, (unsigned long long)v, (long long)v);
}
_PUBLIC_ void ndr_print_hyper(struct ndr_print *ndr, const char *name, uint64_t v)
@@ -781,7 +781,7 @@ _PUBLIC_ void ndr_print_array_uint8(struct ndr_print *ndr, const char *name,
_PUBLIC_ void ndr_print_DATA_BLOB(struct ndr_print *ndr, const char *name, DATA_BLOB r)
{
- ndr->print(ndr, "%-25s: DATA_BLOB length=%u", name, r.length);
+ ndr->print(ndr, "%-25s: DATA_BLOB length=%u", name, (unsigned)r.length);
if (r.length) {
dump_data(10, r.data, r.length);
}
diff --git a/source4/librpc/ndr/ndr_spoolss_buf.c b/source4/librpc/ndr/ndr_spoolss_buf.c
index f599e04c86..39e8f4be3c 100644
--- a/source4/librpc/ndr/ndr_spoolss_buf.c
+++ b/source4/librpc/ndr/ndr_spoolss_buf.c
@@ -102,11 +102,11 @@
if (!r->in.buffer && r->in.offered != 0) {\
return ndr_pull_error(ndr, NDR_ERR_BUFSIZE,\
"SPOOLSS Buffer: r->in.offered[%u] but there's no buffer",\
- r->in.offered);\
+ (unsigned)r->in.offered);\
} else if (r->in.buffer && r->in.buffer->length != r->in.offered) {\
return ndr_pull_error(ndr, NDR_ERR_BUFSIZE,\
"SPOOLSS Buffer: r->in.offered[%u] doesn't match length of r->in.buffer[%u]",\
- r->in.offered, r->in.buffer->length);\
+ (unsigned)r->in.offered, (unsigned)r->in.buffer->length);\
}\
} while(0)
@@ -127,7 +127,7 @@
if (r->in.offered != _ndr_info->data_size) {\
return ndr_pull_error(ndr, NDR_ERR_BUFSIZE,\
"SPOOLSS Buffer: offered[%u] doesn't match length of buffer[%u]",\
- r->in.offered, (unsigned)_ndr_info->data_size);\
+ (unsigned)r->in.offered, (unsigned)_ndr_info->data_size);\
}\
if (r->out.needed <= _ndr_info->data_size) {\
struct __##fn __r;\
diff --git a/source4/ntvfs/nbench/vfs_nbench.c b/source4/ntvfs/nbench/vfs_nbench.c
index 34cf8d9565..a56338d931 100644
--- a/source4/ntvfs/nbench/vfs_nbench.c
+++ b/source4/ntvfs/nbench/vfs_nbench.c
@@ -67,7 +67,7 @@ static char *nbench_ntvfs_handle_string(struct ntvfs_request *req, struct ntvfs_
break;
default:
DEBUG(0,("%s: invalid wire handle size: %u\n",
- __FUNCTION__, key.length));
+ __FUNCTION__, (unsigned)key.length));
break;
}
diff --git a/source4/smb_server/smb/receive.c b/source4/smb_server/smb/receive.c
index 6fce5dc7c0..fd80224787 100644
--- a/source4/smb_server/smb/receive.c
+++ b/source4/smb_server/smb/receive.c
@@ -142,7 +142,8 @@ NTSTATUS smbsrv_recv_smb_request(void *private, DATA_BLOB blob)
}
if (NBT_HDR_SIZE + MIN_SMB_SIZE + 2*req->in.wct + req->in.data_size > req->in.size) {
- DEBUG(2,("Invalid SMB buffer length count %d\n", req->in.data_size));
+ DEBUG(2,("Invalid SMB buffer length count %d\n",
+ (int)req->in.data_size));
smbsrv_terminate_connection(req->smb_conn, "Invalid SMB packet");
return NT_STATUS_OK;
}
diff --git a/source4/smb_server/smb2/smb2_server.h b/source4/smb_server/smb2/smb2_server.h
index b58bf5511a..353300681f 100644
--- a/source4/smb_server/smb2/smb2_server.h
+++ b/source4/smb_server/smb2/smb2_server.h
@@ -71,13 +71,13 @@ struct smbsrv_request;
uint16_t want_size = ((dynamic)?(size)+1:(size)); \
if (is_size < (size)) { \
DEBUG(0,("%s: buffer too small 0x%x. Expected 0x%x\n", \
- __location__, is_size, want_size)); \
+ __location__, (unsigned)is_size, (unsigned)want_size)); \
smb2srv_send_error(req, NT_STATUS_FOOBAR); \
return; \
}\
if (field_size != want_size) { \
DEBUG(0,("%s: unexpected fixed body size 0x%x. Expected 0x%x\n", \
- __location__, field_size, want_size)); \
+ __location__, (unsigned)field_size, (unsigned)want_size)); \
smb2srv_send_error(req, NT_STATUS_FOOBAR); \
return; \
} \
diff --git a/source4/torture/basic/base.c b/source4/torture/basic/base.c
index 1275ab08e3..daeb6ad118 100644
--- a/source4/torture/basic/base.c
+++ b/source4/torture/basic/base.c
@@ -1465,7 +1465,7 @@ static BOOL run_iometer(struct torture_context *torture)
goto done;
}
- printf("size: %d\n", filesize);
+ printf("size: %d\n", (int)filesize);
filesize -= (sizeof(buf) - 1);
diff --git a/source4/torture/raw/acls.c b/source4/torture/raw/acls.c
index ebad7568c4..65d6b62cf7 100644
--- a/source4/torture/raw/acls.c
+++ b/source4/torture/raw/acls.c
@@ -962,10 +962,10 @@ static BOOL test_inheritance(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
const char *fname1 = BASEDIR "\\inheritance\\testfile";
const char *fname2 = BASEDIR "\\inheritance\\testdir";
BOOL ret = True;
- int fnum, fnum2, i;
+ int fnum=0, fnum2, i;
union smb_fileinfo q;
union smb_setfileinfo set;
- struct security_descriptor *sd, *sd2, *sd_orig, *sd_def;
+ struct security_descriptor *sd, *sd2, *sd_orig=NULL, *sd_def;
const char *owner_sid;
const struct dom_sid *creator_owner;
const struct {
@@ -1384,10 +1384,10 @@ static BOOL test_inheritance_dynamic(struct smbcli_state *cli, TALLOC_CTX *mem_c
const char *dname = BASEDIR "\\inheritance";
const char *fname1 = BASEDIR "\\inheritance\\testfile";
BOOL ret = True;
- int fnum, fnum2;
+ int fnum=0, fnum2;
union smb_fileinfo q;
union smb_setfileinfo set;
- struct security_descriptor *sd, *sd_orig;
+ struct security_descriptor *sd, *sd_orig=NULL;
const char *owner_sid;
printf("TESTING DYNAMIC ACL INHERITANCE\n");
@@ -1554,7 +1554,7 @@ static BOOL test_sd_get_set(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
struct security_descriptor *sd_group = NULL;
struct security_descriptor *sd_dacl = NULL;
struct security_descriptor *sd_sacl = NULL;
- int fnum;
+ int fnum=0;
const char *fname = BASEDIR "\\sd_get_set.txt";
uint64_t desired_64;
uint32_t desired = 0, granted;
diff --git a/source4/torture/raw/qfileinfo.c b/source4/torture/raw/qfileinfo.c
index 7998fcf501..d7199972ca 100644
--- a/source4/torture/raw/qfileinfo.c
+++ b/source4/torture/raw/qfileinfo.c
@@ -605,8 +605,8 @@ BOOL torture_raw_qfileinfo(struct torture_context *torture)
if (s2->all_info.out.ea_size !=
ea_list_size(s1->all_eas.out.num_eas, s1->all_eas.out.eas)) {
printf("ERROR: ea_list_size=%d != fnum all_info.out.ea_size=%d\n",
- ea_list_size(s1->all_eas.out.num_eas, s1->all_eas.out.eas),
- s2->all_info.out.ea_size);
+ (int)ea_list_size(s1->all_eas.out.num_eas, s1->all_eas.out.eas),
+ (int)s2->all_info.out.ea_size);
}
}
}
diff --git a/source4/torture/raw/read.c b/source4/torture/raw/read.c
index 1e73259dec..ef99eb0103 100644
--- a/source4/torture/raw/read.c
+++ b/source4/torture/raw/read.c
@@ -725,7 +725,7 @@ static BOOL test_read_for_execute(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
union smb_read rd;
NTSTATUS status;
BOOL ret = True;
- int fnum;
+ int fnum=0;
uint8_t *buf;
const int maxsize = 900;
const char *fname = BASEDIR "\\test.txt";
diff --git a/source4/torture/smb2/util.c b/source4/torture/smb2/util.c
index da74e47c0a..d167f6690e 100644
--- a/source4/torture/smb2/util.c
+++ b/source4/torture/smb2/util.c
@@ -175,9 +175,9 @@ static NTSTATUS smb2_create_complex(struct smb2_tree *tree, const char *fname,
printf("(%s) " #field " not setup correctly: %s(%llu) => %s(%llu)\n", \
__location__, \
nt_time_string(tree, setfile.basic_info.in.field), \
- setfile.basic_info.in.field, \
+ (unsigned long long)setfile.basic_info.in.field, \
nt_time_string(tree, fileinfo.basic_info.out.field), \
- fileinfo.basic_info.out.field); \
+ (unsigned long long)fileinfo.basic_info.out.field); \
status = NT_STATUS_INVALID_PARAMETER; \
} \
} while (0)
diff --git a/source4/wrepl_server/wrepl_in_connection.c b/source4/wrepl_server/wrepl_in_connection.c
index a7522a0165..5db2c883f9 100644
--- a/source4/wrepl_server/wrepl_in_connection.c
+++ b/source4/wrepl_server/wrepl_in_connection.c
@@ -69,7 +69,8 @@ static NTSTATUS wreplsrv_recv_request(void *private, DATA_BLOB blob)
NT_STATUS_NOT_OK_RETURN(status);
if (DEBUGLVL(10)) {
- DEBUG(10,("Received WINS-Replication packet of length %u\n", packet_in_blob.length + 4));
+ DEBUG(10,("Received WINS-Replication packet of length %u\n",
+ (unsigned)packet_in_blob.length + 4));
NDR_PRINT_DEBUG(wrepl_packet, &call->req_packet);
}
diff --git a/source4/wrepl_server/wrepl_scavenging.c b/source4/wrepl_server/wrepl_scavenging.c
index 4382195d53..5628728a76 100644
--- a/source4/wrepl_server/wrepl_scavenging.c
+++ b/source4/wrepl_server/wrepl_scavenging.c
@@ -57,8 +57,8 @@ static NTSTATUS wreplsrv_scavenging_owned_records(struct wreplsrv_service *servi
time_t now = time(NULL);
const char *now_timestr;
const char *action;
- const char *old_state;
- const char *new_state;
+ const char *old_state=NULL;
+ const char *new_state=NULL;
uint32_t modify_flags;
BOOL modify_record;
BOOL delete_record;
@@ -171,8 +171,8 @@ static NTSTATUS wreplsrv_scavenging_replica_non_active_records(struct wreplsrv_s
time_t now = time(NULL);
const char *now_timestr;
const char *action;
- const char *old_state;
- const char *new_state;
+ const char *old_state=NULL;
+ const char *new_state=NULL;
uint32_t modify_flags;
BOOL modify_record;
BOOL delete_record;
@@ -435,7 +435,8 @@ static NTSTATUS wreplsrv_scavenging_replica_active_records(struct wreplsrv_servi
* but we use a wins name query
*/
DEBUG(0,("ask wins server '%s' if '%s' with version_id:%llu still exists\n",
- rec->wins_owner, nbt_name_string(rec, rec->name), rec->version));
+ rec->wins_owner, nbt_name_string(rec, rec->name),
+ (unsigned long long)rec->version));
s = talloc_zero(tmp_mem, struct verify_state);
NT_STATUS_HAVE_NO_MEMORY(s);
diff --git a/source4/wrepl_server/wrepl_server.c b/source4/wrepl_server/wrepl_server.c
index cfd0151eb3..55ab76c228 100644
--- a/source4/wrepl_server/wrepl_server.c
+++ b/source4/wrepl_server/wrepl_server.c
@@ -200,7 +200,7 @@ NTSTATUS wreplsrv_load_partners(struct wreplsrv_service *service)
}
DEBUG(2,("wreplsrv_load_partners: %u partners found: wins_config_db seqnumber %llu\n",
- res->count, service->config.seqnumber));
+ res->count, (unsigned long long)service->config.seqnumber));
talloc_free(tmp_ctx);
return NT_STATUS_OK;
@@ -329,7 +329,8 @@ NTSTATUS wreplsrv_add_table(struct wreplsrv_service *service,
ret = winsdb_set_maxVersion(service->wins_db, cur->owner.max_version);
if (ret != cur->owner.max_version) {
DEBUG(0,("winsdb_set_maxVersion(%llu) failed: %llu\n",
- cur->owner.max_version, ret));
+ (unsigned long long)cur->owner.max_version,
+ (unsigned long long)ret));
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
}