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@xxxxxxxxxx> --- 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()); } -- 2.7.4