[PATCH] S390: Get rid of
Stefan Liebler
stli@linux.vnet.ibm.com
Fri Dec 12 13:05:00 GMT 2014
Hi,
on 31bit s390 i get the following warning/error:
tst-widetext.c: In function âdo_testâ:
tst-widetext.c:295:5: error: format â%Zdâ expects argument of type
âsigned size_tâ, but argument 3 has type âintâ [-Werror=format=]
__LINE__, wcp - wc2buf, wcsize);
^
This patch adds a cast to ssize_t in order to disable the warning.
Ok to commit?
Bye
Stefan
---
2014-12-12 Stefan Liebler <stli@linux.vnet.ibm.com>
* libio/tst-widetext.c (do_test):
Cast argument to ssize_t to disable format warning.
-------------- next part --------------
diff --git a/libio/tst-widetext.c b/libio/tst-widetext.c
index acab72b..a591159 100644
--- a/libio/tst-widetext.c
+++ b/libio/tst-widetext.c
@@ -292,7 +292,7 @@ do_test (void)
if (fgetws (wcp, &wc2buf[wcsize] - wcp + 1, fp) == NULL)
{
printf ("%u: short read using fgetws (only %Zd of %Zd)\n",
- __LINE__, wcp - wc2buf, wcsize);
+ __LINE__, (ssize_t) (wcp - wc2buf), wcsize);
status = 1;
break;
}
More information about the Libc-alpha
mailing list