This is a discussion on Fixing signed/unsigned warnings? within the C++ Programming forums, part of the General Programming Boards category; Originally Posted by matsp I would also add an assert(buflen >= 0) (or if-statement with a printout, or similar) just ...