[c2772] Fix various warnings

(based on commit 568de8c)