Other compiler warning fixes: this is another chunk of compiler warning fixes in LTP tests, related to printf format strings. They have multiple causes:
- most of them are caused by %d used for the TEST_RETURN variable (as in a previous patch),
- off_t are cast to (int64_t) and PRId64 output specifier is used for them,
- other types are cast to (intmax_t) or (uintmax_t) and use the %jd or %ju (C99) output specifier. I've used this solution because it's generally correct, easy to use solution that is portable and (IMHO) more readable than using PRId64/PRIu64 and a cast (which you generally can't avoid). This way, there's only a cast,
- in ioperm test, address should be declared as unsigned long (according to ioperm(2)),
- other little fixes (foo vs. *foo, %S vs. %s, %0 vs. %o).
Signed-off-by: Jiri Palecek <jpalecek@web.de>.
diff --git a/testcases/kernel/syscalls/read/read01.c b/testcases/kernel/syscalls/read/read01.c
index 04e514d..150f5fa 100644
--- a/testcases/kernel/syscalls/read/read01.c
+++ b/testcases/kernel/syscalls/read/read01.c
@@ -30,7 +30,7 @@
  * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
  *
  */
-/* $Id: read01.c,v 1.7 2009/03/23 13:36:01 subrata_modak Exp $ */
+/* $Id: read01.c,v 1.8 2009/11/02 13:57:17 subrata_modak Exp $ */
 /**********************************************************
  *
  *    OS Test - Silicon Graphics, Inc.
@@ -197,7 +197,7 @@
 	     ***************************************************************/
 			if (STD_FUNCTIONAL_TEST) {
 				/* No Verification test, yet... */
-				tst_resm(TPASS, "read(pfds) returned %d",
+				tst_resm(TPASS, "read(pfds) returned %ld",
 					 TEST_RETURN);
 			}
 		}