Skip to content

Commit

Permalink
Merge pull request #773 from zhekov/pointer-from-integer
Browse files Browse the repository at this point in the history
Fix warnings about casting pointer from/to different size integer
  • Loading branch information
b4n committed Nov 30, 2015
2 parents 4821770 + e49093b commit 27628c0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/sciwrappers.c
Expand Up @@ -970,7 +970,7 @@ void sci_get_text_range(ScintillaObject *sci, gint start, gint end, gchar *text)
tr.chrg.cpMin = start;
tr.chrg.cpMax = end;
tr.lpstrText = text;
SSM(sci, SCI_GETTEXTRANGE, 0, (long) &tr);
SSM(sci, SCI_GETTEXTRANGE, 0, (sptr_t) &tr);
}


Expand Down
2 changes: 1 addition & 1 deletion src/win32.c
Expand Up @@ -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);
g_free(err);
return NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion tagmanager/src/tm_workspace.c
Expand Up @@ -398,7 +398,7 @@ static guint tm_file_inode_hash(gconstpointer key)
#ifdef TM_DEBUG
g_message ("Hash for '%s' is '%d'\n", filename, file_stat.st_ino);
#endif
return g_direct_hash ((gpointer)(gulong)file_stat.st_ino);
return g_direct_hash ((gpointer)(intptr_t)file_stat.st_ino);
} else {
return 0;
}
Expand Down

0 comments on commit 27628c0

Please sign in to comment.