Squash warnings

svn path=/trunk/netsurf/; revision=6912
This commit is contained in:
John Mark Bell 2009-03-27 01:27:27 +00:00
parent 2b352b5752
commit ae326427a1
1 changed files with 6 additions and 4 deletions

View File

@ -149,10 +149,12 @@ void theme_install_callback(content_msg msg, struct content *c,
bool theme_install_read(char *source_data, unsigned long source_size)
{
void *data = source_data;
if (source_size < sizeof(struct theme_file_header))
return false;
if (!ro_gui_theme_read_file_header(&theme_install_descriptor,
(struct theme_file_header *) source_data))
(struct theme_file_header *) data))
return false;
if (source_size - sizeof(struct theme_file_header) !=
theme_install_descriptor.compressed_size)
@ -183,7 +185,7 @@ bool ro_gui_theme_install_apply(wimp_w w)
LOG(("malloc failed"));
warn_user("NoMemory", 0);
}
for (fix = theme_file; *fix != '\0'; *fix++)
for (fix = theme_file; *fix != '\0'; fix++)
if (*fix == ' ')
*fix = 160; /* hard space */
@ -193,8 +195,8 @@ bool ro_gui_theme_install_apply(wimp_w w)
theme_save[sizeof theme_save - 1] = '\0';
error = xosfile_save_stamped(theme_save, 0xffd,
theme_install_content->source_data,
theme_install_content->source_data +
(unsigned char *) theme_install_content->source_data,
(unsigned char *) theme_install_content->source_data +
theme_install_content->source_size);
if (error) {
LOG(("xosfile_save_stamped: 0x%x: %s",