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
This commit is contained in:
Guy Harris 2012-12-24 23:10:18 +00:00
parent 87c1df5ead
commit d2a22e242d
2 changed files with 10 additions and 9 deletions

View File

@ -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;

View File

@ -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.