Fix warnings about casting pointer from/to different size integer
These appear under 64-bit Windows. Only the sciwrappers.c warning is potentially dangerous. For win32.c, the "handle" provides some useful information, while "lStdHandle" does not.
This commit is contained in:
parent
1a84bb6e34
commit
e49093b75f
@ -970,7 +970,7 @@ void sci_get_text_range(ScintillaObject *sci, gint start, gint end, gchar *text)
|
|||||||
tr.chrg.cpMin = start;
|
tr.chrg.cpMin = start;
|
||||||
tr.chrg.cpMax = end;
|
tr.chrg.cpMax = end;
|
||||||
tr.lpstrText = text;
|
tr.lpstrText = text;
|
||||||
SSM(sci, SCI_GETTEXTRANGE, 0, (long) &tr);
|
SSM(sci, SCI_GETTEXTRANGE, 0, (sptr_t) &tr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -816,7 +816,7 @@ static FILE *open_std_handle(DWORD handle, const char *mode)
|
|||||||
if (hConHandle == -1)
|
if (hConHandle == -1)
|
||||||
{
|
{
|
||||||
gchar *err = g_win32_error_message(GetLastError());
|
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);
|
||||||
g_free(err);
|
g_free(err);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -398,7 +398,7 @@ static guint tm_file_inode_hash(gconstpointer key)
|
|||||||
#ifdef TM_DEBUG
|
#ifdef TM_DEBUG
|
||||||
g_message ("Hash for '%s' is '%d'\n", filename, file_stat.st_ino);
|
g_message ("Hash for '%s' is '%d'\n", filename, file_stat.st_ino);
|
||||||
#endif
|
#endif
|
||||||
return g_direct_hash ((gpointer)(gulong)file_stat.st_ino);
|
return g_direct_hash ((gpointer)(intptr_t)file_stat.st_ino);
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user