> @@ -816,7 +816,7 @@ static FILE *open_std_handle(DWORD handle, const char 
> *mode)
>       if (hConHandle == -1)
>       {
>               gchar *err = g_win32_error_message(GetLastError());
> -             g_warning("_open_osfhandle(%ld, _O_TEXT) failed: %s", 
> (long)lStdHandle, err);
> +             g_warning("_open_osfhandle(handle(%ld), _O_TEXT) failed: %s", 
> (long)handle, err);

Because (a) the lStdHandle value does not carry any useful information, it may 
be anything, while handle is at least the constant numeric value of 
STD_INPUT/OUTPUT/ERROR_HANDLE, and (b) if a lStdHandle is used, it should at 
least be cast properly, with HandleToLong() or something, instead of (long). 
Only the least significant 32-bits are actually used, so "%ld" is OK.

---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/773/files#r46179083

Reply via email to