2 ms·
> > 1. The function dev_write() is declared as returning ssize_t, but the return value at the end of the function is sizeof(int). ssize_t and size_t are differe
by wizzwizz4 4y ago
> > 1. The function dev_write() is declared as returning ssize_t, but the return value at the end of the function is sizeof(int). ssize_t and size_t are different types, so this could cause a type mismatch.
> This is an interesting observation that you and I both missed.
Hah. Call me when you find an architecture where ints use over half the addressable memory.
- wizeman 4y ago> Hah. Call me when you find an architecture where ints use over half the addressable memory. I mean, I get your point if it's a joke :) But I think the AI was just pointing out that you'd get a compiler warning because of the type mismatch in signedness (is this even a word?).
- int_19h 4y agoIt's the small negative numbers that bite you there when they undergo unsigned overflow.