[RFC] Clang analyzer: fix dead stores

Remove dead assignments as pointed out by [static analysis](http://neovim.org/doc/build-reports/clang/). [Here](https://fwalch.github.io/doc-ci/build-reports/clang) is a static analysis report that includes the changes of this PR.

I didn't fix the [dead assignment in garray.c](http://neovim.org/doc/build-reports/clang/report-c565a2.html#EndPath), because otherwise the build would fail with `error: ignoring return value of ‘xstpcpy’, declared with attribute warn_unused_result`, and I didn't know what to do about that.
It's only a dead store because all of the following if branches will set `curr_c`. What if the code below is changed? We may end up with an uninitialized `curr_c`. What if declare and initialize `curr_c` here (`int curr_c = c;`)? It's a good practice to initialize variables. Specially before a set of branches that write to it.