From patchwork Fri Dec 12 13:04:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Liebler X-Patchwork-Id: 4214 Received: (qmail 7673 invoked by alias); 12 Dec 2014 13:04:25 -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 7660 invoked by uid 89); 12 Dec 2014 13:04:24 -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 format warning in mem.c Date: Fri, 12 Dec 2014 14:04:04 +0100 Lines: 50 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: gcc mem.c -c ... mem.c: In function 'gc': mem.c:428:4: error: format '%zu' expects argument of type 'size_t', but argument 2 has type 'int' [-Werror=format=] dbnames[db - dbs]); ^ cc1: all warnings being treated as errors This patch adds a cast to size_t in order to disable the warning. Ok to commit? Bye Stefan --- 2014-12-12 Stefan Liebler * nscd/mem.c (gc): Cast argument to size_t to disable format warning. diff --git a/nscd/mem.c b/nscd/mem.c index b4090fb..d94c6db 100644 --- a/nscd/mem.c +++ b/nscd/mem.c @@ -423,7 +423,7 @@ gc (struct database_dyn *db) if (__glibc_unlikely (debug_level >= 3)) dbg_log (_("freed %zu bytes in %s cache"), - db->head->first_free + (size_t) db->head->first_free - ((char *) moves->to + moves->size - db->data), dbnames[db - dbs]);