[12729] Fix some warnings reported by static analysis