logcollector

* fix some compiler warnings
* fix some static analyzer warnings