At first I thought that clang/gcc were just being pedantic, but now I wonder if this is legit. Could size here be negative under some pathological condition? If so, the warning about comparing signed and unsigned is good.