aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk/gui_utils.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2012-12-24 23:10:18 +0000
committerGuy Harris <guy@alum.mit.edu>2012-12-24 23:10:18 +0000
commitd2a22e242daa7e0fc84c6daef0e936eb3cac3044 (patch)
tree8766182ac3ef223874f47c2e6503661b507a6900 /ui/gtk/gui_utils.c
parent87c1df5ead2f8ee3884fcfa77dbbdf929fc68668 (diff)
Cast away warnings implicit 64-bit-to-32-bit conversions. (We should
probably have routines that convert strings to numbers and do range checks, and should also ignore values in the recent and preferences files that are out of range.) Cast a string to "char *" to squelch an otherwise-unavoidable warning about qualifiers being ignored. The media type for raw binary data is application/octet-stream, not application octet_stream. svn path=/trunk/; revision=46727
Diffstat (limited to 'ui/gtk/gui_utils.c')
-rw-r--r--ui/gtk/gui_utils.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/ui/gtk/gui_utils.c b/ui/gtk/gui_utils.c
index c6227c726f..b03126757e 100644
--- a/ui/gtk/gui_utils.c
+++ b/ui/gtk/gui_utils.c
@@ -514,16 +514,16 @@ window_geom_recent_read_pair(const char *name,
}
if (strcmp(key, "x") == 0) {
- geom.x = strtol(value, NULL, 10);
+ geom.x = (gint)strtol(value, NULL, 10);
geom.set_pos = TRUE;
} else if (strcmp(key, "y") == 0) {
- geom.y = strtol(value, NULL, 10);
+ geom.y = (gint)strtol(value, NULL, 10);
geom.set_pos = TRUE;
} else if (strcmp(key, "width") == 0) {
- geom.width = strtol(value, NULL, 10);
+ geom.width = (gint)strtol(value, NULL, 10);
geom.set_size = TRUE;
} else if (strcmp(key, "height") == 0) {
- geom.height = strtol(value, NULL, 10);
+ geom.height = (gint)strtol(value, NULL, 10);
geom.set_size = TRUE;
} else if (strcmp(key, "maximized") == 0) {
if (g_ascii_strcasecmp(value, "true") == 0) {
@@ -1228,10 +1228,11 @@ copy_binary_to_clipboard(const guint8 *data_p,
int len)
{
static GtkTargetEntry target_entry[] = {
- {"application/octet_stream", 0, 0}}; /* XXX - this not understood by most applications,
- * but can be pasted into the better hex editors - is
- * there something better that we can do?
- */
+ {(char *)"application/octet-stream", 0, 0}};
+ /* XXX - this is not understood by most applications,
+ * but can be pasted into the better hex editors - is
+ * there something better that we can do?
+ */
GtkClipboard *cb;
copy_binary_t *copy_data;