From e094a2a04476b0c2afd223db95f756221ba012dd Mon Sep 17 00:00:00 2001 From: abbyz9 Date: Wed, 3 Jun 2009 20:56:36 +0000 Subject: [PATCH] Fix typecast format warnings when printing the 9p debug information git-svn-id: http://npfs.svn.sourceforge.net/svnroot/npfs/spfs/trunk@33 fd0465a7-2a7b-4605-b674-a3f860cb63d9 --- libspfs/fmt.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libspfs/fmt.c b/libspfs/fmt.c index 9a9d07b..e4f9b23 100644 --- a/libspfs/fmt.c +++ b/libspfs/fmt.c @@ -78,7 +78,7 @@ sp_printqid(FILE *f, Spqid *q) buf[n++] = 'L'; buf[n] = '\0'; - return fprintf(f, " (%.16llx %x '%s')", q->path, q->version, buf); + return fprintf(f, " (%.16llx %x '%s')", (unsigned long long)q->path, q->version, buf); } int @@ -93,8 +93,8 @@ sp_printstat(FILE *f, Spstat *st, int dotu) n += sp_printqid(f, &st->qid); n += fprintf(f, " m "); n += sp_printperm(f, st->mode); - n += fprintf(f, " at %d mt %d l %lld t %d d %d", - st->atime, st->mtime, st->length, st->type, st->dev); + n += fprintf(f, " at %d mt %d l %llu t %d d %d", + st->atime, st->mtime, (unsigned long long)st->length, st->type, st->dev); if (dotu) n += fprintf(f, " ext '%.*s'", st->extension.len, st->extension.str); @@ -241,8 +241,8 @@ sp_printfcall(FILE *f, Spfcall *fc, int dotu) break; case Tread: - ret += fprintf(f, "Tread tag %u fid %d offset %lld count %u", - tag, fid, fc->offset, fc->count); + ret += fprintf(f, "Tread tag %u fid %d offset %llu count %u", + tag, fid, (unsigned long long)fc->offset, fc->count); break; case Rread: @@ -251,8 +251,8 @@ sp_printfcall(FILE *f, Spfcall *fc, int dotu) break; case Twrite: - ret += fprintf(f, "Twrite tag %u fid %d offset %lld count %u data ", - tag, fid, fc->offset, fc->count); + ret += fprintf(f, "Twrite tag %u fid %d offset %llu count %u data ", + tag, fid, (unsigned long long)fc->offset, fc->count); ret += sp_printdata(f, fc->data, fc->count); break; -- 2.11.4.GIT