[Coding style] break long lines
[Coding style] delete whitespaces
Use errx instead of warnx for sanity checks
Fix doxygen warnings