From patchwork Thu Nov 1 06:35:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yufen Yu X-Patchwork-Id: 10663539 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AE8A513B5 for ; Thu, 1 Nov 2018 06:33:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 825652BBFC for ; Thu, 1 Nov 2018 06:33:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 760802BC1F; Thu, 1 Nov 2018 06:33:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9AF2B2BBFC for ; Thu, 1 Nov 2018 06:33:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727666AbeKAPes (ORCPT ); Thu, 1 Nov 2018 11:34:48 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:14587 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727573AbeKAPes (ORCPT ); Thu, 1 Nov 2018 11:34:48 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 12F5995C0F1B4; Thu, 1 Nov 2018 14:33:08 +0800 (CST) Received: from huawei.com (10.90.53.225) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.408.0; Thu, 1 Nov 2018 14:33:09 +0800 From: Yufen Yu To: CC: , Subject: [PATCH blktests] fix discontiguous-io compile error on 32 bit systems Date: Thu, 1 Nov 2018 14:35:48 +0800 Message-ID: <1541054148-144718-1-git-send-email-yuyufen@huawei.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.90.53.225] X-CFilter-Loop: Reflected Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When make discontiguous-io.cpp with -m32, g++ compiler reports error for std::min(long unsigned int, size_t) has diffent arguments type. fixes: fd21728886e7 ("Add the discontiguous-io test program") Signed-off-by: Yufen Yu --- src/discontiguous-io.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/discontiguous-io.cpp b/src/discontiguous-io.cpp index 5e0ee0f..855aba9 100644 --- a/src/discontiguous-io.cpp +++ b/src/discontiguous-io.cpp @@ -291,7 +291,7 @@ int main(int argc, char **argv) unsigned char *p = &*buf.begin(); for (int i = 0; i < len / 4; i++) iov.append(p + 4 + i * 8, - std::min(4ul, len - i * 4)); + std::min((size_t)4, len - i * 4)); } else { iov.append(&*buf.begin(), buf.size()); }