[PATCH 00/16] Coverity warnings and cleanup