[PATCH:xfs 3/4] Fix warnings about mismatched printf arg types

Alan Coopersmith alan.coopersmith at oracle.com
Sat Sep 17 01:03:25 PDT 2011


Mostly from types defined as long or unsigned long which we tried to
print as normal ints.

difs/cache.c: In function `CacheFreeMemory':
difs/cache.c:371: warning: int format, different type arg (arg 2)

difs/resource.c: In function `AddResource':
difs/resource.c:304: warning: unsigned int format, different type arg (arg 2)
difs/resource.c:304: warning: unsigned int format, different type arg (arg 3)
difs/resource.c:304: warning: unsigned int format, pointer arg (arg 4)
difs/resource.c: In function `FreeResource':
difs/resource.c:410: warning: unsigned int format, different type arg (arg 2)

Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 difs/cache.c    |    2 +-
 difs/resource.c |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/difs/cache.c b/difs/cache.c
index 8ec3fd8..da30596 100644
--- a/difs/cache.c
+++ b/difs/cache.c
@@ -368,7 +368,7 @@ CacheFreeMemory(
 	}
     }
     if (!found)
-	FatalError("freeing cache entry %d which isn't there\n", cid);
+	FatalError("freeing cache entry %ld which isn't there\n", cid);
 }
 
 /* ARGSUSED */
diff --git a/difs/resource.c b/difs/resource.c
index 3c616f9..b469aba 100644
--- a/difs/resource.c
+++ b/difs/resource.c
@@ -300,7 +300,7 @@ AddResource(
 
     rrec = &clientTable[cid];
     if (!rrec->buckets) {
-	ErrorF("AddResource(%x, %x, %x), client=%d \n",
+	ErrorF("AddResource(%lx, %lx, %p), client=%d \n",
 	       id, type, value, cid);
 	FatalError("client not in use\n");
     }
@@ -407,7 +407,7 @@ FreeResource(
 	}
     }
     if (!gotOne)
-	FatalError("freeing resource id=%X which isn't there\n", id);
+	FatalError("freeing resource id=%lX which isn't there\n", id);
 }
 
 #ifdef NOTYET
-- 
1.7.3.2



More information about the xorg-devel mailing list