Fix issues reported by a static analyzer