From patchwork Sun Aug 7 18:03:47 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 1042602 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p77IWTmD001091 for ; Sun, 7 Aug 2011 18:32:30 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754525Ab1HGSc2 (ORCPT ); Sun, 7 Aug 2011 14:32:28 -0400 Received: from jester.euphonynet.be ([212.87.96.13]:53894 "EHLO mailpush2.euphonynet.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754513Ab1HGSc1 (ORCPT ); Sun, 7 Aug 2011 14:32:27 -0400 Received: from smtp2.euphonynet.be (smtp2.euphonynet.be [212.87.96.4]) by mailpush2.euphonynet.be (Postfix) with ESMTP id 3ED014F8131; Sun, 7 Aug 2011 20:03:49 +0200 (CEST) Received: from localhost (scan04.euphonynet.be [212.87.96.26]) by smtp2.euphonynet.be (Postfix) with ESMTP id 358A93740963D; Sun, 7 Aug 2011 20:09:22 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at euphonynet.be Received: from ripley.euphonynet.be ([212.87.96.9]) by localhost (scan04.euphonynet.be [212.87.96.23]) (amavisd-new, port 10024) with ESMTP id Isaxcs2+KNtX; Sun, 7 Aug 2011 20:28:26 +0200 (CEST) Received: from asus.localnet (unknown [85.10.72.182]) by ripley.euphonynet.be (Postfix) with ESMTP id 38F375FAD0959; Sun, 7 Aug 2011 20:03:48 +0200 (CEST) From: Bart Van Assche To: linux-rdma@vger.kernel.org Subject: [PATCH 5/7] 32-bit compiler warning fix Date: Sun, 7 Aug 2011 20:03:47 +0200 User-Agent: KMail/1.13.6 (Linux/2.6.38.8-scst; KDE/4.6.0; x86_64; ; ) Cc: Roland Dreier References: <201108072000.16383.bvanassche@acm.org> In-Reply-To: <201108072000.16383.bvanassche@acm.org> MIME-Version: 1.0 Message-Id: <201108072003.47863.bvanassche@acm.org> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Sun, 07 Aug 2011 18:32:30 +0000 (UTC) Avoid that the code in src/memory.c triggers a compiler warning when compiled on a 32-bit system. Signed-off-by: Bart Van Assche --- src/memory.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/memory.c b/src/memory.c index faa43f3..9f13774 100644 --- a/src/memory.c +++ b/src/memory.c @@ -44,6 +44,7 @@ #include #include #include +#include #include "ibverbs.h" @@ -116,7 +117,7 @@ static unsigned long get_page_size(void *base) int n; uintptr_t range_start, range_end; - n = sscanf(buf, "%lx-%lx", &range_start, &range_end); + n = sscanf(buf, "%" SCNxPTR "-%" SCNxPTR, &range_start, &range_end); if (n < 2) continue;