Fix compiler warnings

Fix:
  * implicit declaration of XXX
  * variable XXX may be used uninitialized

Added -Werror flag to .travis.yml to enforce the code without warnings.