mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-12 17:19:28 +01:00
More warning fixes
This commit is contained in:
1 parent
06ec64fa62
commit
ea404141d7
3 files changed
+5
-5
No files matched your search
+2
-2
@@ -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
-1
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user