[geany/geany] 23323f: Cast windows HANDLE to intptr_t, not long

Dimitar Zhekov git-noreply at xxxxx
Tue Nov 3 18:30:53 UTC 2015


Branch:      refs/heads/master
Author:      Dimitar Zhekov <dimitar.zhekov at gmail.com>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Tue, 03 Nov 2015 18:30:53 UTC
Commit:      23323f53779ae54c8a9349bc4b1e0e48ac4acb5f
             https://github.com/geany/geany/commit/23323f53779ae54c8a9349bc4b1e0e48ac4acb5f

Log Message:
-----------
Cast windows HANDLE to intptr_t, not long

The cast in g_warning is not fixed. It's unimportant, displaying a
handle value does not provide any meaningful information anyway.

Closes #727.


Modified Paths:
--------------
    src/win32.c

Modified: src/win32.c
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -812,7 +812,7 @@ static FILE *open_std_handle(DWORD handle, const char *mode)
 		g_free(err);
 		return NULL;
 	}
-	hConHandle = _open_osfhandle((long)lStdHandle, _O_TEXT);
+	hConHandle = _open_osfhandle((intptr_t)lStdHandle, _O_TEXT);
 	if (hConHandle == -1)
 	{
 		gchar *err = g_win32_error_message(GetLastError());



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list