fix warnings/add static analysis