bugfix: only get variable name from variable declarations, and not also from function declaration (which resulted in cast exception)

git-svn-id: https://svn.sosy-lab.org/software/cpachecker/trunk@14746 4712c6d2-40bb-43ae-aa4b-fec3f1bdfe4c