libanalyze: fix compiler warnings + cleanup