diff options
author | Guy Harris <guy@alum.mit.edu> | 2012-12-24 23:10:18 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2012-12-24 23:10:18 +0000 |
commit | d2a22e242daa7e0fc84c6daef0e936eb3cac3044 (patch) | |
tree | 8766182ac3ef223874f47c2e6503661b507a6900 /ui | |
parent | 87c1df5ead2f8ee3884fcfa77dbbdf929fc68668 (diff) | |
download | wireshark-d2a22e242daa7e0fc84c6daef0e936eb3cac3044.tar.gz wireshark-d2a22e242daa7e0fc84c6daef0e936eb3cac3044.tar.bz2 wireshark-d2a22e242daa7e0fc84c6daef0e936eb3cac3044.zip |
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')
-rw-r--r-- | ui/gtk/gui_utils.c | 17 | ||||
-rw-r--r-- | ui/gtk/gui_utils.h | 2 |
2 files changed, 10 insertions, 9 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; diff --git a/ui/gtk/gui_utils.h b/ui/gtk/gui_utils.h index f85262b1f5..a17b78a4eb 100644 --- a/ui/gtk/gui_utils.h +++ b/ui/gtk/gui_utils.h @@ -293,7 +293,7 @@ extern GtkWidget *pixbuf_to_widget(const char * pb_data); extern void copy_to_clipboard(GString *str); /** Copy an array of bytes to the clipboard. - * Copies as mime-type application/octet_stream in GTK 2. + * Copies as mime-type application/octet-stream in GTK 2. * * @param data_p Pointer to data to be copied. * @param len Number of bytes in the data to be copied. |