Code fixes

Various code fixes, mostly discovered by MSVC code static analyzer .
So I guess next cleanup would be to have a return codes defined somewhere.

Nice work otherwise. Merge when you feel ready.
On 17 Oct 2014 15:35, "Karlson2k" <notifications@github.com> wrote:

> In xbmc/win32/XBMC_PC.cpp:
>
> > @@ -120,6 +120,8 @@ INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR commandLine, INT )
> >      std::vector<std::string> strargvA;
> >      strargvA.resize(argc);
> >      const char** argv = (const char**) LocalAlloc(LMEM_FIXED, argc*sizeof(char*));
> > +    if (!argv)
> > +      return 20;
>
> No, just some code > 0.
> Codes in your link are mostly for GetLastError().
> Application commonly use their specific return codes.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/xbmc/xbmc/pull/5045/files#r19017502>.
>