rootcheck

* fix compiler warnings
* fix static analyzer warnings