Introducing dangling pointers to remove analyzer warnings