mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
More warning fixes
This commit is contained in:
parent
06ec64fa62
commit
ea404141d7
@ -86,11 +86,11 @@ bool writeDataToFile(bool text_file, const void* data, const unsigned int size,
|
||||
uint64_t GetSize(FILE *f)
|
||||
{
|
||||
// can't use off_t here because it can be 32-bit
|
||||
uint64_t pos = ftell(f);
|
||||
size_t pos = ftell(f);
|
||||
if (fseek(f, 0, SEEK_END) != 0) {
|
||||
return 0;
|
||||
}
|
||||
uint64_t size = ftell(f);
|
||||
size_t size = ftell(f);
|
||||
// Reset the seek position to where it was when we started.
|
||||
if ((size != pos) && (fseek(f, pos, SEEK_SET) != 0)) {
|
||||
// Should error here
|
||||
|
@ -3,6 +3,8 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
// Whole-file reading/writing
|
||||
bool writeStringToFile(bool text_file, const std::string &str, const char *filename);
|
||||
bool readFileToString(bool text_file, const char *filename, std::string &str);
|
||||
@ -18,7 +20,7 @@ struct FileInfo {
|
||||
bool exists;
|
||||
bool isDirectory;
|
||||
bool isWritable;
|
||||
size_t size;
|
||||
uint64_t size;
|
||||
|
||||
bool operator <(const FileInfo &other) const;
|
||||
};
|
||||
|
@ -50,8 +50,6 @@ int ezuncompress(unsigned char* pDest, long* pnDestLen, const unsigned char* pSr
|
||||
return nExtraChunks ? Z_BUF_ERROR : Z_OK;
|
||||
}
|
||||
|
||||
static const char magic[5] = "ZIMG";
|
||||
|
||||
static unsigned int log2i(unsigned int val) {
|
||||
unsigned int ret = -1;
|
||||
while (val != 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user