fix some clang warnings / errors

- unused var
- uninitialized var
- size_t is always >= 0
- no known constructor for std::istringstream buf(char)