From patchwork Fri Dec 12 13:04:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Liebler X-Patchwork-Id: 4215 Received: (qmail 8849 invoked by alias); 12 Dec 2014 13:05:15 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 8840 invoked by uid 89); 12 Dec 2014 13:05:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: plane.gmane.org To: libc-alpha@sourceware.org From: Stefan Liebler Subject: [PATCH] S390: Get rid of Date: Fri, 12 Dec 2014 14:04:06 +0100 Lines: 44 Message-ID: Mime-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 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 * libio/tst-widetext.c (do_test): Cast argument to ssize_t to disable format warning. 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; }