linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Yufen Yu <yuyufen@huawei.com>, osandov@fb.com
Cc: linux-block@vger.kernel.org, bart.vanassche@wdc.com,
	Theodore Ts'o <tytso@mit.edu>
Subject: Re: [PATCH blktests] fix discontiguous-io compile error on 32 bit systems
Date: Thu, 01 Nov 2018 07:52:48 -0700	[thread overview]
Message-ID: <1541083968.196084.140.camel@acm.org> (raw)
In-Reply-To: <1541054148-144718-1-git-send-email-yuyufen@huawei.com>

On Thu, 2018-11-01 at 14:35 +0800, Yufen Yu wrote:
> 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 <yuyufen@huawei.com>
> ---
>  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());
>  		}

Are you reading the messages posted on linux-block? An alternative that I like
better has been discussed in this e-mail thread:
https://www.spinics.net/lists/linux-block/msg32181.html

Bart.

  reply	other threads:[~2018-11-01 23:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-01  6:35 [PATCH blktests] fix discontiguous-io compile error on 32 bit systems Yufen Yu
2018-11-01 14:52 ` Bart Van Assche [this message]
2018-11-06  2:19   ` yuyufen
2018-11-06  3:29     ` Bart Van Assche

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1541083968.196084.140.camel@acm.org \
    --to=bvanassche@acm.org \
    --cc=bart.vanassche@wdc.com \
    --cc=linux-block@vger.kernel.org \
    --cc=osandov@fb.com \
    --cc=tytso@mit.edu \
    --cc=yuyufen@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).