misc: fix int/enum mismatch errors reported by gcc-14