diff options
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/charcnv.c | 5 | ||||
-rw-r--r-- | source4/lib/gendb.c | 2 | ||||
-rw-r--r-- | source4/lib/ldb/ldb_tdb/ldb_index.c | 2 | ||||
-rw-r--r-- | source4/lib/messaging/messaging.c | 7 | ||||
-rw-r--r-- | source4/lib/registry/reg_backend_nt4.c | 2 | ||||
-rw-r--r-- | source4/lib/util_file.c | 2 | ||||
-rw-r--r-- | source4/lib/util_str.c | 6 |
7 files changed, 14 insertions, 12 deletions
diff --git a/source4/lib/charcnv.c b/source4/lib/charcnv.c index ea0fcd8d32..e632790155 100644 --- a/source4/lib/charcnv.c +++ b/source4/lib/charcnv.c @@ -175,11 +175,12 @@ ssize_t convert_string(charset_t from, charset_t to, if (from == CH_UNIX) { DEBUG(0,("E2BIG: convert_string(%s,%s): srclen=%d destlen=%d - '%s'\n", charset_name(from), charset_name(to), - srclen, destlen, (const char *)src)); + (int)srclen, (int)destlen, + (const char *)src)); } else { DEBUG(0,("E2BIG: convert_string(%s,%s): srclen=%d destlen=%d\n", charset_name(from), charset_name(to), - srclen, destlen)); + (int)srclen, (int)destlen)); } break; case EILSEQ: diff --git a/source4/lib/gendb.c b/source4/lib/gendb.c index 92bbd8155c..4bf76a7f64 100644 --- a/source4/lib/gendb.c +++ b/source4/lib/gendb.c @@ -89,7 +89,7 @@ int gendb_search_dn(struct ldb_context *ldb, struct ldb_message ***res, const char * const *attrs) { - return gendb_search(ldb, mem_ctx, dn, res, attrs, NULL); + return gendb_search(ldb, mem_ctx, dn, res, attrs, "dn=%s", dn); } /* diff --git a/source4/lib/ldb/ldb_tdb/ldb_index.c b/source4/lib/ldb/ldb_tdb/ldb_index.c index 03ad0612d4..87b52ac366 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_index.c +++ b/source4/lib/ldb/ldb_tdb/ldb_index.c @@ -131,7 +131,7 @@ static char *ldb_dn_key(struct ldb_context *ldb, } ret = talloc_asprintf(ldb, "%s:%s:%.*s", - LTDB_INDEX, attr_folded, v.length, (char *)v.data); + LTDB_INDEX, attr_folded, (int)v.length, (char *)v.data); if (v.data != value->data) { talloc_free(v.data); diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c index a29f14f065..4f1589a9ba 100644 --- a/source4/lib/messaging/messaging.c +++ b/source4/lib/messaging/messaging.c @@ -93,7 +93,8 @@ static void ping_message(struct messaging_context *msg, void *private, uint32_t msg_type, uint32_t src, DATA_BLOB *data) { DEBUG(1,("INFO: Received PING message from server %u [%.*s]\n", - (uint_t)src, data->length, data->data?(const char *)data->data:"")); + (uint_t)src, (int)data->length, + data->data?(const char *)data->data:"")); messaging_send(msg, src, MSG_PONG, data); } @@ -198,7 +199,7 @@ static void messaging_recv_handler(struct messaging_context *msg) } if (msize < sizeof(*rec->header)) { - DEBUG(0,("messaging: bad message of size %d\n", msize)); + DEBUG(0,("messaging: bad message of size %d\n", (int)msize)); data_blob_free(&packet); return; } @@ -216,7 +217,7 @@ static void messaging_recv_handler(struct messaging_context *msg) if (msize != sizeof(*rec->header) + rec->header->length) { DEBUG(0,("messaging: bad message header size %d should be %d\n", - rec->header->length, msize - sizeof(*rec->header))); + rec->header->length, (int)(msize - sizeof(*rec->header)))); talloc_free(rec); return; } diff --git a/source4/lib/registry/reg_backend_nt4.c b/source4/lib/registry/reg_backend_nt4.c index 6072222a87..e07534884c 100644 --- a/source4/lib/registry/reg_backend_nt4.c +++ b/source4/lib/registry/reg_backend_nt4.c @@ -1051,7 +1051,7 @@ static WERROR nk_to_key(TALLOC_CTX *mem_ctx, struct registry_hive *h, NK_HDR *nk if (-size < (sizeof(NK_HDR) - 1 + namlen)) { DEBUG(0, ("Incorrect NK_HDR size: %d, %0X\n", -size, (int)nk_hdr)); DEBUG(0, ("Sizeof NK_HDR: %d, name_len %d, clsname_len %d\n", - sizeof(NK_HDR), namlen, clsname_len)); + (int)sizeof(NK_HDR), namlen, clsname_len)); return WERR_GENERAL_FAILURE; } diff --git a/source4/lib/util_file.c b/source4/lib/util_file.c index a7d29d1a1d..fdf06c47c5 100644 --- a/source4/lib/util_file.c +++ b/source4/lib/util_file.c @@ -258,7 +258,7 @@ void *map_file(char *fname, size_t size) if (!p) return NULL; if (s2 != size) { DEBUG(1,("incorrect size for %s - got %d expected %d\n", - fname, s2, size)); + fname, (int)s2, (int)size)); talloc_free(p); return NULL; } diff --git a/source4/lib/util_str.c b/source4/lib/util_str.c index 592c38e53c..a0e9da4160 100644 --- a/source4/lib/util_str.c +++ b/source4/lib/util_str.c @@ -274,7 +274,7 @@ char *safe_strcpy(char *dest,const char *src, size_t maxlength) if (len > maxlength) { DEBUG(0,("ERROR: string overflow by %u (%u - %u) in safe_strcpy [%.50s]\n", - (uint_t)(len-maxlength), len, maxlength, src)); + (uint_t)(len-maxlength), (unsigned)len, (unsigned)maxlength, src)); len = maxlength; } @@ -760,7 +760,7 @@ void strlower_m(char *s) c_size2 = push_codepoint(d, tolower_w(c)); if (c_size2 > c_size) { DEBUG(0,("FATAL: codepoint 0x%x (0x%x) expanded from %d to %d bytes in strlower_m\n", - c, tolower_w(c), c_size, c_size2)); + c, tolower_w(c), (int)c_size, (int)c_size2)); smb_panic("codepoint expansion in strlower_m\n"); } s += c_size; @@ -796,7 +796,7 @@ void strupper_m(char *s) c_size2 = push_codepoint(d, toupper_w(c)); if (c_size2 > c_size) { DEBUG(0,("FATAL: codepoint 0x%x (0x%x) expanded from %d to %d bytes in strupper_m\n", - c, toupper_w(c), c_size, c_size2)); + c, toupper_w(c), (int)c_size, (int)c_size2)); smb_panic("codepoint expansion in strupper_m\n"); } s += c_size; |