Fix Clang static analysis errors

This covers #459 and #460.
I saw it was removed after the last function call somewhere, but does also code like this cause warnings?

```
int pos = 0;
func1(pos);
pos += 1
func2(pos);
```