Fix compiler warnings (-Wconversion)

This commit is contained in:
Michael Liebmann
2013-10-08 07:37:07 +02:00
parent 4ee8fded80
commit b645b644b0
5 changed files with 38 additions and 33 deletions

View File

@@ -510,8 +510,8 @@ int CFlashUpdate::exec(CMenuTarget* parent, const std::string &actionKey)
char * buffer;
off_t filesize = lseek(fileno(fd), 0, SEEK_END);
lseek(fileno(fd), 0, SEEK_SET);
buffer =(char *) malloc(filesize+1);
fread(buffer, filesize, 1, fd);
buffer =(char *) malloc((uint32_t)filesize+1);
fread(buffer, (uint32_t)filesize, 1, fd);
fclose(fd);
buffer[filesize] = 0;
ShowMsgUTF(LOCALE_MESSAGEBOX_INFO, buffer, CMessageBox::mbrBack, CMessageBox::mbBack); // UTF-8