[RFC] misc2.c -Wconversion changes

First go at helping out. Hopefully misc2.c goes away, but in the mean time I fixed up the one method in it that had -Wconversion errors, per #567.

xmallocz zeroes the string at the end, no need to double up on nulling it.

After looking, it seemed like a cnt of int was adequate, no callers used larger sizes. Still, should it be size_t?
I know that using `char` here works the same as `uint8_t`, however it would
be nicer to use an unsigned type as that's what `getc` returns inside the
`int`.

> Character values are returned as an unsigned char converted to an int. If
the stream is at end-of-file or a read error occurs, the routines return
EOF.


On Wed, Jul 2, 2014 at 8:17 AM, John Szakmeister <notifications@github.com>
wrote:

> In src/nvim/misc2.c:
>
> >  {
> > -  int i;
> > -  int c;
> > -
> > -  char_u *str = xmallocz(cnt);
> > -  /* Read the string.  Quit when running into the EOF. */
> > -  for (i = 0; i < cnt; ++i) {
> > -    c = getc(fd);
> > +  char *str = xmallocz(cnt);
>
> @philix <https://github.com/philix> I'm just curious why you think this
> is better? There's no math happening with the string, just straight
> comparisons, and using char * avoids a cast.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/neovim/neovim/pull/907/files#r14451544>.
>