 I think this is a false positive but by restructuring the conditions we could avoid it. Still it would make sense to set up travis ci coverity.