PSP2: Fix some warnings

This commit is contained in:
Jeffrey Pfau 2016-08-23 02:28:57 -07:00
parent 9b4fa75c81
commit 59b4d22833
2 changed files with 2 additions and 4 deletions

View File

@ -6,9 +6,7 @@
#ifndef COMMON_H #ifndef COMMON_H
#define COMMON_H #define COMMON_H
#ifndef PSP2
#include <ctype.h> #include <ctype.h>
#endif
#include <fcntl.h> #include <fcntl.h>
#include <inttypes.h> #include <inttypes.h>
#include <limits.h> #include <limits.h>

View File

@ -84,8 +84,8 @@ bool PNGWritePixels(png_structp png, unsigned width, unsigned height, unsigned s
bool PNGWriteCustomChunk(png_structp png, const char* name, size_t size, void* data) { bool PNGWriteCustomChunk(png_structp png, const char* name, size_t size, void* data) {
char realName[5]; char realName[5];
strncpy(realName, name, 4); strncpy(realName, name, 4);
realName[0] = tolower(realName[0]); realName[0] = tolower((int) realName[0]);
realName[1] = tolower(realName[1]); realName[1] = tolower((int) realName[1]);
realName[4] = '\0'; realName[4] = '\0';
if (setjmp(png_jmpbuf(png))) { if (setjmp(png_jmpbuf(png))) {
return false; return false;