On Mon, 2018-10-29 at 12:15 -0400, Theodore Ts'o wrote: +AD4 Signed-off-by: Theodore Ts'o +ADw-tytso+AEA-mit.edu+AD4 +AD4 --- +AD4 src/discontiguous-io.cpp +AHw 2 +-- +AD4 1 file changed, 1 insertion(+-), 1 deletion(-) +AD4 +AD4 diff --git a/src/discontiguous-io.cpp b/src/discontiguous-io.cpp +AD4 index 5e0ee0f..a59c18d 100644 +AD4 --- a/src/discontiguous-io.cpp +AD4 +-+-+- b/src/discontiguous-io.cpp +AD4 +AEAAQA -291,7 +-291,7 +AEAAQA int main(int argc, char +ACoAKg-argv) +AD4 unsigned char +ACo-p +AD0 +ACYAKg-buf.begin()+ADs +AD4 for (int i +AD0 0+ADs i +ADw len / 4+ADs i+-+-) +AD4 iov.append(p +- 4 +- i +ACo 8, +AD4 - std::min(4ul, len - i +ACo 4))+ADs +AD4 +- std::min(4ul, (unsigned long) len - i +ACo 4))+ADs +AD4 +AH0 else +AHs +AD4 iov.append(+ACYAKg-buf.begin(), buf.size())+ADs +AD4 +AH0 Hi Ted, Have you considered to change the data type of 'len' from size+AF8-t into unsigned long instead of inserting this cast? That would make it clear that no integer truncation happens in the iov.append() call. Thanks, Bart.