[Thunar-dev] compiling problems on 64bit
Roberto Pariset
r.pariset at gmail.com
Tue Jan 3 15:41:28 CET 2006
This is the error:
cc1: warnings being treated as errors
tdbtool.c: In function ‘print_rec’:
tdbtool.c:345: warning: format ‘%d’ expects type ‘int’, but argument 3
has type ‘size_t’
tdbtool.c:347: warning: format ‘%d’ expects type ‘int’, but argument 3
has type ‘size_t’
size_t on i386 is unsigned int, but on amd64 is unsigned long, which
is 8 byte instead of 4. Trivial patch follows, hope it will work...
Rob
Index: tdb/tdbtool.c
===================================================================
--- tdb/tdbtool.c (revisione 19287)
+++ tdb/tdbtool.c (copia locale)
@@ -342,9 +342,9 @@
static int print_rec(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA dbuf,
void *state)
{
- fprintf(pDumpFile,"\nkey %d bytes\n", key.dsize);
+ fprintf(pDumpFile,"\nkey %zu bytes\n", key.dsize);
print_asc((unsigned char*)key.dptr, key.dsize);
- fprintf(pDumpFile,"\ndata %d bytes\n", dbuf.dsize);
+ fprintf(pDumpFile,"\ndata %zu bytes\n", dbuf.dsize);
print_data((unsigned char*)dbuf.dptr, dbuf.dsize);
return 0;
}
More information about the Thunar-dev
mailing list