mirror of
https://github.com/samba-team/samba.git
synced 2025-02-23 09:57:40 +03:00
r24631: Fix up format warnings, found on my Fedora 7 x86_64 workstation.
Andrew Bartlett (This used to be commit 3d74d178bfd89127ff387939e848b240e638cc35)
This commit is contained in:
parent
32ce9de932
commit
dfa4e5f784
@ -674,7 +674,7 @@ static struct drsuapi_DsReplicaAttribute *dsdb_find_object_attr_name(struct dsdb
|
||||
} \
|
||||
if (strict && _a->value_ctr.num_values != 1) { \
|
||||
d_printf("%s: %s num_values == %u\n", __location__, attr, \
|
||||
_a->value_ctr.num_values); \
|
||||
(unsigned int)_a->value_ctr.num_values); \
|
||||
return WERR_INVALID_PARAM; \
|
||||
} \
|
||||
if (strict && !_a->value_ctr.values[0].blob) { \
|
||||
@ -683,7 +683,7 @@ static struct drsuapi_DsReplicaAttribute *dsdb_find_object_attr_name(struct dsdb
|
||||
} \
|
||||
if (strict && _a->value_ctr.values[0].blob->length != 4) { \
|
||||
d_printf("%s: %s length == %u\n", __location__, attr, \
|
||||
_a->value_ctr.values[0].blob->length); \
|
||||
(unsigned int)_a->value_ctr.values[0].blob->length); \
|
||||
return WERR_INVALID_PARAM; \
|
||||
} \
|
||||
if (_a && _a->value_ctr.num_values >= 1 \
|
||||
|
@ -261,7 +261,7 @@ static WERROR dsdb_syntax_INT64_drsuapi_to_ldb(const struct dsdb_schema *schema,
|
||||
|
||||
v = BVALS(in->value_ctr.values[i].blob->data, 0);
|
||||
|
||||
str = talloc_asprintf(out->values, "%lld", v);
|
||||
str = talloc_asprintf(out->values, "%lld", (long long int)v);
|
||||
W_ERROR_HAVE_NO_MEMORY(str);
|
||||
|
||||
out->values[i] = data_blob_string_const(str);
|
||||
@ -948,7 +948,7 @@ static WERROR dsdb_syntax_DN_BINARY_drsuapi_to_ldb(const struct dsdb_schema *sch
|
||||
W_ERROR_HAVE_NO_MEMORY(binary);
|
||||
|
||||
str = talloc_asprintf(out->values, "B:%u:%s:%s",
|
||||
id3b.binary.length * 2, /* because of 2 hex chars per byte */
|
||||
(unsigned int)(id3b.binary.length * 2), /* because of 2 hex chars per byte */
|
||||
binary,
|
||||
id3b.dn);
|
||||
W_ERROR_HAVE_NO_MEMORY(str);
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "includes.h"
|
||||
#include "lib/ldb/include/ldb.h"
|
||||
#include "lib/ldb/include/ldb_errors.h"
|
||||
#include "lib/db_wrap.h"
|
||||
|
||||
/*
|
||||
search the sam for the specified attributes - va_list variant
|
||||
|
@ -61,10 +61,11 @@ static bool torture_local_idtree_simple(struct torture_context *tctx)
|
||||
}
|
||||
} else {
|
||||
if (p != NULL) {
|
||||
torture_fail(tctx, talloc_asprintf(tctx,
|
||||
"non-present at %d gave %p (would be %d)",
|
||||
ii, p,
|
||||
(int)(((char *)p) - (char *)(&ids[0])) / sizeof(int)));
|
||||
torture_fail(tctx,
|
||||
talloc_asprintf(tctx,
|
||||
"non-present at %d gave %p (would be %d)",
|
||||
ii, p,
|
||||
(int)((((char *)p) - (char *)(&ids[0])) / sizeof(int))));
|
||||
}
|
||||
if (random() % 5) {
|
||||
ids[ii] = idr_get_new(idr, &ids[ii], n);
|
||||
|
@ -402,11 +402,13 @@ const struct ndr_interface_table *load_iface_from_plugin(const char *plugin, con
|
||||
f->ndr_print(ndr_v_print, function, flags, v_st);
|
||||
|
||||
if (blob.length != v_blob.length) {
|
||||
printf("WARNING! orig bytes:%u validated pushed bytes:%u\n", blob.length, v_blob.length);
|
||||
printf("WARNING! orig bytes:%llu validated pushed bytes:%llu\n",
|
||||
(unsigned long long)blob.length, (unsigned long long)v_blob.length);
|
||||
}
|
||||
|
||||
if (ndr_pull->offset != ndr_v_pull->offset) {
|
||||
printf("WARNING! orig pulled bytes:%u validated pulled bytes:%u\n", ndr_pull->offset, ndr_v_pull->offset);
|
||||
printf("WARNING! orig pulled bytes:%llu validated pulled bytes:%llu\n",
|
||||
(unsigned long long)ndr_pull->offset, (unsigned long long)ndr_v_pull->offset);
|
||||
}
|
||||
|
||||
differ = false;
|
||||
|
@ -256,7 +256,7 @@ static int binary_smbd_main(const char *binary_name, int argc, const char *argv[
|
||||
if (sizeof(uint16_t) < 2 || sizeof(uint32_t) < 4 || sizeof(uint64_t) < 8) {
|
||||
DEBUG(0,("ERROR: Samba is not configured correctly for the word size on your machine\n"));
|
||||
DEBUGADD(0,("sizeof(uint16_t) = %u, sizeof(uint32_t) %u, sizeof(uint64_t) = %u\n",
|
||||
sizeof(uint16_t), sizeof(uint32_t), sizeof(uint64_t)));
|
||||
(unsigned int)sizeof(uint16_t), (unsigned int)sizeof(uint32_t), (unsigned int)sizeof(uint64_t)));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
@ -132,9 +132,9 @@ static bool test_check_uptodatevector(struct torture_context *torture,
|
||||
}
|
||||
|
||||
torture_comment(torture, "[%u]: uSNChanged[%llu] description[%s] replUpToDateVector[%s]\n", i,
|
||||
samdb_result_uint64(r->msgs[0], "uSNChanged", 0),
|
||||
samdb_result_string(r->msgs[0], "description", NULL),
|
||||
(no_match ? "changed!: not ok" : "not changed: ok"));
|
||||
(unsigned long long)samdb_result_uint64(r->msgs[0], "uSNChanged", 0),
|
||||
samdb_result_string(r->msgs[0], "description", NULL),
|
||||
(no_match ? "changed!: not ok" : "not changed: ok"));
|
||||
|
||||
if (no_match) {
|
||||
NDR_PRINT_DEBUG(replUpToDateVectorBlob, &utdv1);
|
||||
|
@ -185,8 +185,8 @@ static BOOL smb_raw_query_posix_whoami(void *mem_ctx,
|
||||
|
||||
printf("\tmapping_flags=0x%08x mapping_mask=0x%08x\n",
|
||||
whoami->mapping_flags, whoami->mapping_mask);
|
||||
printf("\tserver UID=%lld GID=%lld\n",
|
||||
whoami->server_uid, whoami->server_gid);
|
||||
printf("\tserver UID=%llu GID=%llu\n",
|
||||
(unsigned long long)whoami->server_uid, (unsigned long long)whoami->server_gid);
|
||||
printf("\t%u GIDs, %u SIDs, %u SID bytes\n",
|
||||
whoami->num_gids, whoami->num_sids,
|
||||
whoami->num_sid_bytes);
|
||||
|
Loading…
x
Reference in New Issue
Block a user