svn commit: samba r24631 - in branches/SAMBA_4_0/source: dsdb/schema lib lib/util/tests librpc/tools smbd torture/ldap torture/unix

abartlet at samba.org abartlet at samba.org
Thu Aug 23 02:10:19 GMT 2007


Author: abartlet
Date: 2007-08-23 02:10:17 +0000 (Thu, 23 Aug 2007)
New Revision: 24631

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24631

Log:
Fix up format warnings, found on my Fedora 7 x86_64 workstation.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/dsdb/schema/schema_init.c
   branches/SAMBA_4_0/source/dsdb/schema/schema_syntax.c
   branches/SAMBA_4_0/source/lib/gendb.c
   branches/SAMBA_4_0/source/lib/util/tests/idtree.c
   branches/SAMBA_4_0/source/librpc/tools/ndrdump.c
   branches/SAMBA_4_0/source/smbd/server.c
   branches/SAMBA_4_0/source/torture/ldap/uptodatevector.c
   branches/SAMBA_4_0/source/torture/unix/whoami.c


Changeset:
Modified: branches/SAMBA_4_0/source/dsdb/schema/schema_init.c
===================================================================
--- branches/SAMBA_4_0/source/dsdb/schema/schema_init.c	2007-08-22 16:03:17 UTC (rev 24630)
+++ branches/SAMBA_4_0/source/dsdb/schema/schema_init.c	2007-08-23 02:10:17 UTC (rev 24631)
@@ -674,7 +674,7 @@
 	} \
 	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 @@
 	} \
 	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 \

Modified: branches/SAMBA_4_0/source/dsdb/schema/schema_syntax.c
===================================================================
--- branches/SAMBA_4_0/source/dsdb/schema/schema_syntax.c	2007-08-22 16:03:17 UTC (rev 24630)
+++ branches/SAMBA_4_0/source/dsdb/schema/schema_syntax.c	2007-08-23 02:10:17 UTC (rev 24631)
@@ -261,7 +261,7 @@
 
 		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 @@
 		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);

Modified: branches/SAMBA_4_0/source/lib/gendb.c
===================================================================
--- branches/SAMBA_4_0/source/lib/gendb.c	2007-08-22 16:03:17 UTC (rev 24630)
+++ branches/SAMBA_4_0/source/lib/gendb.c	2007-08-23 02:10:17 UTC (rev 24631)
@@ -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

Modified: branches/SAMBA_4_0/source/lib/util/tests/idtree.c
===================================================================
--- branches/SAMBA_4_0/source/lib/util/tests/idtree.c	2007-08-22 16:03:17 UTC (rev 24630)
+++ branches/SAMBA_4_0/source/lib/util/tests/idtree.c	2007-08-23 02:10:17 UTC (rev 24631)
@@ -61,10 +61,11 @@
 			}
 		} 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);

Modified: branches/SAMBA_4_0/source/librpc/tools/ndrdump.c
===================================================================
--- branches/SAMBA_4_0/source/librpc/tools/ndrdump.c	2007-08-22 16:03:17 UTC (rev 24630)
+++ branches/SAMBA_4_0/source/librpc/tools/ndrdump.c	2007-08-23 02:10:17 UTC (rev 24631)
@@ -402,11 +402,13 @@
 		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;

Modified: branches/SAMBA_4_0/source/smbd/server.c
===================================================================
--- branches/SAMBA_4_0/source/smbd/server.c	2007-08-22 16:03:17 UTC (rev 24630)
+++ branches/SAMBA_4_0/source/smbd/server.c	2007-08-23 02:10:17 UTC (rev 24631)
@@ -256,7 +256,7 @@
 	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);
 	}
 

Modified: branches/SAMBA_4_0/source/torture/ldap/uptodatevector.c
===================================================================
--- branches/SAMBA_4_0/source/torture/ldap/uptodatevector.c	2007-08-22 16:03:17 UTC (rev 24630)
+++ branches/SAMBA_4_0/source/torture/ldap/uptodatevector.c	2007-08-23 02:10:17 UTC (rev 24631)
@@ -132,9 +132,9 @@
 		}
 
 		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);

Modified: branches/SAMBA_4_0/source/torture/unix/whoami.c
===================================================================
--- branches/SAMBA_4_0/source/torture/unix/whoami.c	2007-08-22 16:03:17 UTC (rev 24630)
+++ branches/SAMBA_4_0/source/torture/unix/whoami.c	2007-08-23 02:10:17 UTC (rev 24631)
@@ -185,8 +185,8 @@
 
 	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);



More information about the samba-cvs mailing list