newbuild: codec2: fix most of static analyzer warnings