From 343e8b38f6b122458ae52d87f0856eb01172d2b3 Mon Sep 17 00:00:00 2001 From: Wouter Wijsman Date: Sat, 18 May 2024 22:25:31 +0200 Subject: [PATCH] Fix spharm example for gcc14 --- src/samples/gu/spharm/cube.c | 5 +++-- src/samples/gu/spharm/spharm.c | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) 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)