[WIP] Fix some clang analysis warnings

For the time being I fixed only [two](http://neovim.org/doc/build-reports/clang/report-21342f.html#EndPath) [errors](http://neovim.org/doc/build-reports/clang/report-f0c777.html#EndPath) `Argument with 'nonnull' attribute passed null` in `open_line()` from `misc1.c`.
The problem is that `clang` don't know that `int get_leader_len()` can't return something less than 0.
Better solution could be the change of the return type to `size_t` or `uint32_t` but it would involve more changes and I can't decide which type would be the best. Though if it is desirable I would be glad to realise that change.

I plan to fix some more warnings in the future in this PR.
On August 18, 2014 1:50:06 AM GMT+03:00, Nicolas Hillegeer <notifications@github.com> wrote:
>> @@ -3518,14 +3517,14 @@ int do_join(long count,
>>     * column.  This is not Vi compatible, but Vi deletes the marks,
>thus that
>>     * should not really be a problem.
>>     */
>> -  for (t = count - 1;; --t) {
>> +  for (size_t t = count - 1; t > 0; --t) {
>
>No idea why my comments aren't appearing the global conversation, but
>to rephrase them:
>
>- `t > 0` is always true, the type is unsigned (the compiler should
>have warned about this)

? Unsigned types may have zero value. This is the same as (t != 0) or just 't'. I would suggest using the first variant, not just 't' or greater than comparison.

>- `count - 1` with an unsigned type is inviting an underflow, even if
>it can be guaranteed that `count > 1`, we should still rewrite the loop
>to do without subtractions if possible (or with a signed type).
>
>---
>Reply to this email directly or view it on GitHub:
>https://github.com/neovim/neovim/pull/1075/files#r16332367