diff --git a/src/samples/gu/spharm/cube.c b/src/samples/gu/spharm/cube.c index 4915fe35..1c3a5653 100644 --- a/src/samples/gu/spharm/cube.c +++ b/src/samples/gu/spharm/cube.c @@ -77,14 +77,14 @@ struct Vertex __attribute__((aligned(16))) vertices[12*3] = int done = 0; /* Exit callback */ -int exit_callback(void) +int exit_callback(int arg1, int arg2, void *common) { done = 1; return 0; } /* Callback thread */ -void CallbackThread(void *arg) +int CallbackThread(SceSize args, void *arg) { int cbid; @@ -92,6 +92,7 @@ void CallbackThread(void *arg) sceKernelRegisterExitCallback(cbid); sceKernelSleepThreadCB(); + return cbid; } /* Sets up the callback thread and returns its thread id */ diff --git a/src/samples/gu/spharm/spharm.c b/src/samples/gu/spharm/spharm.c index 3651a8e8..2874b647 100644 --- a/src/samples/gu/spharm/spharm.c +++ b/src/samples/gu/spharm/spharm.c @@ -18,6 +18,7 @@ #include #include +#include #include "mt19937.h" /* @@ -31,7 +32,7 @@ float shift23=(float)(1<<23); float OOshift23=1.0f/(float)(1<<23); -static inline float floorf(float i) +inline float floorf(float i) { // return largest integer that is less than or equal to i float k = (float)((int) i); if (k <= i) diff --git a/src/samples/mp3/main.c b/src/samples/mp3/main.c index 5f0dd4d3..8e4c992a 100644 --- a/src/samples/mp3/main.c +++ b/src/samples/mp3/main.c @@ -60,8 +60,8 @@ int SetupCallbacks(void) // Input and Output buffers -char mp3Buf[16*1024] __attribute__((aligned(64))); -short pcmBuf[16*(1152/2)] __attribute__((aligned(64))); +unsigned char mp3Buf[16*1024] __attribute__((aligned(64))); +unsigned char pcmBuf[16*(1152/2)] __attribute__((aligned(64))); // Macro to allow formatted input without having to use stdargs.h @@ -87,9 +87,9 @@ void error( char* msg ) int fillStreamBuffer( int fd, int handle ) { - char* dst; - int write; - int pos; + unsigned char* dst; + long int write; + long int pos; // Get Info on the stream (where to fill to, how much to fill, where to fill from) int status = sceMp3GetInfoToAddStreamData( handle, &dst, &write, &pos); if (status<0) @@ -208,7 +208,7 @@ int main(int argc, char *argv[]) printf("PSP Mp3 Sample v1.0 by Raphael\n\n"); printf("Playing '%s'...\n", MP3FILE); printf(" %i Hz\n", samplingRate); - printf(" %i kbit/s\n", sceMp3GetBitRate( handle )); + printf(" %li kbit/s\n", sceMp3GetBitRate( handle )); printf(" %s\n", numChannels==2?"Stereo":"Mono"); printf(" %s\n\n", loop==0?"No loop":"Loop"); int playTime = samplingRate>0?numPlayed / samplingRate:0; diff --git a/src/samples/nand/dumpipl/main.c b/src/samples/nand/dumpipl/main.c index 37d4804d..757efea3 100644 --- a/src/samples/nand/dumpipl/main.c +++ b/src/samples/nand/dumpipl/main.c @@ -125,7 +125,7 @@ int ReadIPLBlockTable(void *pBlockBuf) die("can't read IPL block table!"); } - printf("Found IPL block table at block %d\n", uiBlockNum); + printf("Found IPL block table at block %ld\n", uiBlockNum); break; } diff --git a/src/samples/net/simple/main.c b/src/samples/net/simple/main.c index fecc5303..d2475214 100644 --- a/src/samples/net/simple/main.c +++ b/src/samples/net/simple/main.c @@ -99,7 +99,7 @@ void start_server(const char *szIpAddr) int sock; int new = -1; struct sockaddr_in client; - size_t size; + long unsigned int size; int readbytes; char data[1024]; fd_set set; diff --git a/src/samples/net/simple_prx/main.c b/src/samples/net/simple_prx/main.c index f37ccd81..e042d4cb 100644 --- a/src/samples/net/simple_prx/main.c +++ b/src/samples/net/simple_prx/main.c @@ -65,7 +65,7 @@ void start_server(const char *szIpAddr) int sock; int new = -1; struct sockaddr_in client; - size_t size; + long unsigned int size; int readbytes; char data[1024]; fd_set set;