r18301: I discovered how to load the warnings from a build farm build into
authorAndrew Tridgell <tridge@samba.org>
Sat, 9 Sep 2006 10:05:58 +0000 (10:05 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:18:04 +0000 (14:18 -0500)
emacs compile mode (hint, paste to a file, and compile as "cat
filename").

This allowed me to fix nearly all the warnings for a IA_64 SuSE build
very quickly.
(This used to be commit eba6c84efff735bb0ca941ac4b755ce2b0591667)

28 files changed:
source4/auth/gensec/gensec_gssapi.c
source4/auth/gensec/socket.c
source4/dsdb/samdb/ldb_modules/rootdse.c
source4/dsdb/samdb/ldb_modules/schema.c
source4/ldap_server/ldap_backend.c
source4/ldap_server/ldap_bind.c
source4/lib/appweb/mpr/var.c
source4/lib/ldb/modules/ldb_map_outbound.c
source4/lib/ldb/modules/operational.c
source4/lib/tdb/common/io.c
source4/lib/tdb/common/lock.c
source4/lib/tls/tls.c
source4/libcli/raw/rawfile.c
source4/libcli/smb2/smb2.h
source4/libcli/wrepl/winsrepl.c
source4/librpc/ndr/ndr_basic.c
source4/librpc/ndr/ndr_spoolss_buf.c
source4/ntvfs/nbench/vfs_nbench.c
source4/smb_server/smb/receive.c
source4/smb_server/smb2/smb2_server.h
source4/torture/basic/base.c
source4/torture/raw/acls.c
source4/torture/raw/qfileinfo.c
source4/torture/raw/read.c
source4/torture/smb2/util.c
source4/wrepl_server/wrepl_in_connection.c
source4/wrepl_server/wrepl_scavenging.c
source4/wrepl_server/wrepl_server.c

index 3bf14505f5c9047c44424f6b5dbe560971148959..d9f6edc7d71003cff2a1e13c8eb80fd995657ff8 100644 (file)
@@ -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;
                }
index 3567bf801d702fff4d755c9f9784a2fd2d957007..cf7b196f9d75d71117cc5abaae98139537751567 100644 (file)
@@ -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;
                }
                
index ab9c43577cd155a2cba5fe2250bb7d8073820ff1..ba0dc5645c024687d239c0fdc6724d666926be06 100644 (file)
@@ -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;
        }
index 36b7916e95f1ff0284da99704733b384f1ef4a0b..95330e7e8cc11c60b688a3ce2ae7afa645b76a2a 100644 (file)
@@ -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);
index bbb16a2e9040b8e7a8fabc7d430ea17e996fadd3..e8e3e293b7b77a02a09ab52b4f7439faa6bc1a49 100644 (file)
@@ -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;
index fe23d55d1d06cf8db09ff95f715b4b434989f29f..9736def3bf6dcd780f99b22fe3782d5e908b6bb7 100644 (file)
@@ -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;
index 011d668460d371f542993d5759d5ba076508b236..11ac7120651cd649081feb3724f99f1eb649e4c2 100644 (file)
@@ -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);
index 229299288caddd49076bcc18e6486c2a7788e219..7d1649c6f5c269b6bd01191708721deafc672ab3 100644 (file)
@@ -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 */
index b14d552e836ff9f0accd810d84068ae9f0e9c3a1..1e405355c4a1b868c3491ff7f8656281ae23e3a7 100644 (file)
@@ -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;
        }
 
index d0ef94831d79e7e6a13a621e5c0a6708298feb07..383023e88a4912fc7f23233cf1f2fd06ea6085b5 100644 (file)
@@ -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);
                }
        }
index 821fd351861a5f52cb663aae3fbb29cb80714779..7594aedfcda30f788f8f72f03dd61cf58736b010 100644 (file)
@@ -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);
        }
index cd65e22bcbe9bd991fa46a083fa66f5f7b1a2b36..8c885543ee60783b50abf25b821002b73112753d 100644 (file)
@@ -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;
index f8b5e90e4b173febd4fc702f40d7d85fcd785630..3d2d40758346d8ece38a5b49593394164aa5dc42 100644 (file)
@@ -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:
index 070eaf54ababaf354892190cd12bd545cb030534..586acaccf608de7ef60482df329889b0e6eebd86 100644 (file)
@@ -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)
index 83cbe2877ddc93ebf96e370c2d3e99672e7aff47..78ee2d165e98cd9e9a702f0dbf3607f409915fb3 100644 (file)
@@ -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);
        }
 
index f4ba7868652629b0e5a1432b3f2ebdd69f853d6a..ed79f354fab347b99c06d3568a436858878c1b7a 100644 (file)
@@ -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);
        }
index f599e04c8656c8fdc0cbb07c9d8990d119b0fac4..39e8f4be3c79393ad7108989f15cba2a0d39c020 100644 (file)
        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)
 
                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;\
index 34cf8d9565ff0ffe1abe1be1a4672276ce1076fc..a56338d93132943b0e3006b3b1df58b4ff67a339 100644 (file)
@@ -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;
        }
 
index 6fce5dc7c0ec6ec0aeb61284ab03b0806398fd9d..fd80224787dfb28ba5b5a37a693708c8bbcb22f9 100644 (file)
@@ -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;
        }
index b58bf5511a290446a73457982b1cecba84673035..353300681f746c8b9a39609128ceebcb1adf7b03 100644 (file)
@@ -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; \
        } \
index 1275ab08e31dcefc94be3def0f783f1f357dc1e1..daeb6ad11802e4221809edf8f1724c01ba9e75ba 100644 (file)
@@ -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);
 
index ebad7568c496f89d43037d3c8fb9ae28c1e98f43..65d6b62cf7c6e1fd6b4fa10485420d77eb2bec24 100644 (file)
@@ -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;
index 7998fcf50110ec81ba27362f384902b3c0bb5d55..d7199972cabcf79ee5f72882589e0ed2f201f501 100644 (file)
@@ -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);
                        }
                }
        }
index 1e73259dec16ac209f4a9d37383b25897f1fc295..ef99eb010399a8f483afeef74d6d0355b17cb159 100644 (file)
@@ -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";
index da74e47c0ad15453ea4b5aca761d816ee854c28d..d167f6690e67f1976b199fdf19098a3595b69897 100644 (file)
@@ -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)
index a7522a0165f2888b52e31550327d2b5be68e6e25..5db2c883f94ff6eda08897444fb4ea9b3bea05fc 100644 (file)
@@ -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);
        }
 
index 4382195d5320423a7f8edc08ddcfc645a387cffd..5628728a7602020a7b2ca71140b40a63d3c9b741 100644 (file)
@@ -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);
index cfd0151eb32bda9fc92018e22c525de86f5ca623..55ab76c2289b63dd13c68e1af4eb31dbb6700ca9 100644 (file)
@@ -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;
                        }
                }