mirror of
https://github.com/pspdev/pspsdk.git
synced 2025-12-24 04:32:36 +00:00
Merge pull request #37 from pspdev/fixes
Cleanup some compiler warnings
This commit is contained in:
@@ -454,7 +454,7 @@ char * strstr(const char * string, const char * substring)
|
||||
{
|
||||
char* strpos;
|
||||
|
||||
if (string == 0)
|
||||
if (*string == 0)
|
||||
return 0;
|
||||
|
||||
if (strlen(substring)==0)
|
||||
|
||||
@@ -123,9 +123,6 @@
|
||||
IMPORT_FUNC "sceRtc",0x62685E98,sceRtcGetLastAdjustedTime
|
||||
#endif
|
||||
#ifdef F_sceRtc_0040
|
||||
IMPORT_FUNC "sceRtc",0xDFBC5F16,sceRtcParseDateTime
|
||||
#endif
|
||||
#ifdef F_sceRtc_0041
|
||||
IMPORT_FUNC "sceRtc",0xE1C93E47,sceRtcGetTime64_t
|
||||
#endif
|
||||
|
||||
|
||||
@@ -162,15 +162,12 @@
|
||||
IMPORT_FUNC "sceRtc_driver",0xCE27DE2F,sceRtcEnd
|
||||
#endif
|
||||
#ifdef F_sceRtc_driver_0053
|
||||
IMPORT_FUNC "sceRtc_driver",0xDFBC5F16,sceRtcParseDateTime
|
||||
#endif
|
||||
#ifdef F_sceRtc_driver_0054
|
||||
IMPORT_FUNC "sceRtc_driver",0xE1C93E47,sceRtcGetTime64_t
|
||||
#endif
|
||||
#ifdef F_sceRtc_driver_0055
|
||||
#ifdef F_sceRtc_driver_0054
|
||||
IMPORT_FUNC "sceRtc_driver",0xF0B5571C,sceRtcSynchronize
|
||||
#endif
|
||||
#ifdef F_sceRtc_driver_0056
|
||||
#ifdef F_sceRtc_driver_0055
|
||||
IMPORT_FUNC "sceRtc_driver",0xFB3B18CD,sceRtc_driver_FB3B18CD
|
||||
#endif
|
||||
|
||||
|
||||
@@ -168,5 +168,5 @@ static const struct _library_entry {
|
||||
unsigned short funcCount;
|
||||
void * entrytable;
|
||||
} _library_entry __attribute__((section(".lib.ent"), used)) = {
|
||||
NULL, 0, 0x8000, 4, 1, 1, &__entrytable
|
||||
NULL, 0, 0x8000, 4, 1, 1, (unsigned int *) &__entrytable
|
||||
};
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
#include <pspmoduleexport.h>
|
||||
#define NULL ((void *) 0)
|
||||
|
||||
void extern module_start;
|
||||
void extern module_info;
|
||||
extern int module_start;
|
||||
extern struct SceModuleInfo module_info;
|
||||
static const unsigned int __syslib_exports[4] __attribute__((section(".rodata.sceResident"))) = {
|
||||
0xD632ACDB,
|
||||
0xF01D73A7,
|
||||
@@ -21,5 +21,5 @@ static const unsigned int __syslib_exports[4] __attribute__((section(".rodata.sc
|
||||
};
|
||||
|
||||
const struct _PspLibraryEntry __library_exports[1] __attribute__((section(".lib.ent"), used)) = {
|
||||
{ NULL, 0x0000, 0x8000, 4, 1, 1, &__syslib_exports },
|
||||
{ NULL, 0x0000, 0x8000, 4, 1, 1, (unsigned int *) &__syslib_exports },
|
||||
};
|
||||
|
||||
@@ -2025,7 +2025,7 @@
|
||||
IMPORT_FUNC "scePaf",0x10F3BB61,memset
|
||||
#endif
|
||||
#ifdef F_scePaf_0674
|
||||
IMPORT_FUNC "scePaf",0x81D0D1F7,memcpy
|
||||
IMPORT_FUNC "scePaf",0x81D0D1F7,memcmp
|
||||
#endif
|
||||
#ifdef F_scePaf_0675
|
||||
IMPORT_FUNC "scePaf",0x7EDCC45E,floorf
|
||||
|
||||
@@ -405,7 +405,7 @@ void build_exports(void)
|
||||
fprintf(stdout, "\t{ \"%s\", ", pLib->name);
|
||||
}
|
||||
|
||||
fprintf(stdout, "0x%04X, 0x%04X, 4, %d, %d, &__%s_exports },\n", pLib->ver, pLib->attr,
|
||||
fprintf(stdout, "0x%04X, 0x%04X, 4, %d, %d, (unsigned int *) &__%s_exports },\n", pLib->ver, pLib->attr,
|
||||
pLib->varCount, pLib->funcCount, pLib->name);
|
||||
|
||||
pLib = pLib->pNext;
|
||||
|
||||
@@ -283,7 +283,6 @@ int validate_header(unsigned char *data)
|
||||
int load_sections(unsigned char *data)
|
||||
{
|
||||
int ret = 0;
|
||||
int found_rel = 0;
|
||||
unsigned int load_addr = 0xFFFFFFFF;
|
||||
|
||||
if(g_elfhead.iShnum > 0)
|
||||
@@ -336,7 +335,6 @@ int load_sections(unsigned char *data)
|
||||
&& (g_elfsections[g_elfsections[i].iInfo].iFlags & SHF_ALLOC))
|
||||
{
|
||||
g_elfsections[i].pRef = &g_elfsections[g_elfsections[i].iInfo];
|
||||
found_rel = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user