Reduce cppcheck warnings (style) in lib subdirectory.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>