<p>In <a href="https://github.com/geany/geany/pull/773#discussion_r46179083">src/win32.c</a>:</p>
<pre style='color:#555'>> @@ -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);
</pre>
<p>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.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/geany/geany/pull/773/files#r46179083">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ_yUuWOCGp38ISKPgzNhh-NF5eOaks5pLIfAgaJpZM4GopY8.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/pull/773/files#r46179083"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>