summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-09-04 08:55:58 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:39:49 -0500
commit5f2b59622ea1d2ca72577e3c7f60c5868a2aa20a (patch)
tree50e9bf1124d75e13f7bf4366601d0055a6df277a /source3/lib
parentb85e21d3f4c172e0dd2f194c2370653aa38101ee (diff)
downloadsamba-5f2b59622ea1d2ca72577e3c7f60c5868a2aa20a.tar.gz
samba-5f2b59622ea1d2ca72577e3c7f60c5868a2aa20a.tar.bz2
samba-5f2b59622ea1d2ca72577e3c7f60c5868a2aa20a.zip
r18027: Fix some 64-bit warnings
(This used to be commit 54706285f7394e458b6481d0285f67ed225ea34e)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/talloc.c2
-rw-r--r--source3/lib/talloctort.c27
2 files changed, 19 insertions, 10 deletions
diff --git a/source3/lib/talloc.c b/source3/lib/talloc.c
index b7284e9317..43c95a86e5 100644
--- a/source3/lib/talloc.c
+++ b/source3/lib/talloc.c
@@ -890,7 +890,7 @@ static void talloc_report_depth_FILE_helper(const void *ptr, int depth, int max_
name,
(unsigned long)talloc_total_size(ptr),
(unsigned long)talloc_total_blocks(ptr),
- talloc_reference_count(ptr));
+ (int)talloc_reference_count(ptr));
}
/*
diff --git a/source3/lib/talloctort.c b/source3/lib/talloctort.c
index ca5e9042d3..8640e9475e 100644
--- a/source3/lib/talloctort.c
+++ b/source3/lib/talloctort.c
@@ -960,8 +960,10 @@ static BOOL test_talloc_ptrtype(void)
s1 = talloc_ptrtype(top, s1);location1 = __location__;
if (talloc_get_size(s1) != sizeof(struct struct1)) {
- printf("%s: talloc_ptrtype() allocated the wrong size %u (should be %u)\n",
- __location__, talloc_get_size(s1), sizeof(struct struct1));
+ printf("%s: talloc_ptrtype() allocated the wrong size %lu "
+ "(should be %lu)\n",
+ __location__, (unsigned long)talloc_get_size(s1),
+ (unsigned long)sizeof(struct struct1));
ret = False;
}
@@ -974,22 +976,27 @@ static BOOL test_talloc_ptrtype(void)
s2 = talloc_array_ptrtype(top, s2, 10);location2 = __location__;
if (talloc_get_size(s2) != (sizeof(struct struct1) * 10)) {
- printf("%s: talloc_array_ptrtype() allocated the wrong size %u (should be %u)\n",
- __location__, talloc_get_size(s2), (sizeof(struct struct1)*10));
+ printf("%s: talloc_array_ptrtype() allocated the wrong size "
+ "%lu (should be %lu)\n",
+ __location__, (unsigned long)talloc_get_size(s2),
+ (unsigned long)(sizeof(struct struct1)*10));
ret = False;
}
if (strcmp(location2, talloc_get_name(s2)) != 0) {
printf("%s: talloc_array_ptrtype() sets the wrong name '%s' (should be '%s')\n",
- __location__, talloc_get_name(s2), location2);
+ __location__, talloc_get_name(s2),
+ location2);
ret = False;
}
s3 = talloc_array_ptrtype(top, s3, 10);location3 = __location__;
if (talloc_get_size(s3) != (sizeof(struct struct1 *) * 10)) {
- printf("%s: talloc_array_ptrtype() allocated the wrong size %u (should be %u)\n",
- __location__, talloc_get_size(s3), (sizeof(struct struct1 *)*10));
+ printf("%s: talloc_array_ptrtype() allocated the wrong size "
+ "%lu (should be %lu)\n",
+ __location__, (unsigned long)talloc_get_size(s3),
+ (unsigned long)(sizeof(struct struct1 *)*10));
ret = False;
}
@@ -1002,8 +1009,10 @@ static BOOL test_talloc_ptrtype(void)
s4 = talloc_array_ptrtype(top, s4, 10);location4 = __location__;
if (talloc_get_size(s4) != (sizeof(struct struct1 **) * 10)) {
- printf("%s: talloc_array_ptrtype() allocated the wrong size %u (should be %u)\n",
- __location__, talloc_get_size(s4), (sizeof(struct struct1 **)*10));
+ printf("%s: talloc_array_ptrtype() allocated the wrong size "
+ "%lu (should be %lu)\n",
+ __location__, (unsigned long)talloc_get_size(s4),
+ (unsigned long)(sizeof(struct struct1 **)*10));
ret = False;
}