From fa43b5862d9bf4797b1fd4febcde2841d83ab103 Mon Sep 17 00:00:00 2001 From: orbea Date: Mon, 10 Oct 2022 11:29:56 -0700 Subject: [PATCH] Fix -Werror=strict-prototypes This will be required for upcoming gcc and clang versions. Reference: https://archives.gentoo.org/gentoo-dev/message/dd9f2d3082b8b6f8dfbccb0639e6e240 --- configure | 11 ++++++----- pico/draw2.c | 3 +-- pico/pico.h | 2 +- pico/pico_int.h | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/configure b/configure index 1310ab2c..17f71858 100755 --- a/configure +++ b/configure @@ -265,7 +265,7 @@ check_libpng() { cat > $TMPC < - void main() { png_init_io(0, 0); } + void main(void) { png_init_io(0, 0); } EOF # compile_binary compile_object @@ -276,7 +276,7 @@ check_oss() cat > $TMPC < #include - void main() { int a=0; ioctl(0, SNDCTL_DSP_SETFMT, &a); } + void main(void) { int a=0; ioctl(0, SNDCTL_DSP_SETFMT, &a); } EOF compile_binary } @@ -285,7 +285,7 @@ check_alsa() { cat > $TMPC < - void main() { snd_pcm_open(0, 0, 0, 0); } + void main(void) { snd_pcm_open(0, 0, 0, 0); } EOF compile_binary "$@" } @@ -294,7 +294,7 @@ check_sdl() { cat > $TMPC < - void main() { SDL_OpenAudio(0, 0); } + void main(void) { SDL_OpenAudio(0, 0); } EOF compile_binary "$@" } @@ -303,7 +303,7 @@ check_libavcodec() { cat > $TMPC < - void main() { avcodec_decode_audio3(0, 0, 0, 0); } + void main(void) { avcodec_decode_audio3(0, 0, 0, 0); } EOF compile_object "$@" } @@ -353,6 +353,7 @@ if [ "$need_sdl" = "yes" ]; then fi cat > $TMPC < void test(void *f, void *d) { fread(d, 1, 1, f); } EOF if compile_object -Wno-unused-result; then diff --git a/pico/draw2.c b/pico/draw2.c index f0e0518e..1f9d3e0c 100644 --- a/pico/draw2.c +++ b/pico/draw2.c @@ -26,8 +26,7 @@ static int HighCache2A[41*(TILE_ROWS+1)+1+1]; // caches for high layers static int HighCache2B[41*(TILE_ROWS+1)+1+1]; unsigned short *PicoCramHigh=PicoMem.cram; // pointer to CRAM buff (0x40 shorts), converted to native device color (works only with 16bit for now) -void (*PicoPrepareCram)()=0; // prepares PicoCramHigh for renderer to use - +void (*PicoPrepareCram)(void)=0; // prepares PicoCramHigh for renderer to use // stuff available in asm: #ifdef _ASM_DRAW_C diff --git a/pico/pico.h b/pico/pico.h index ac1550d4..4033098c 100644 --- a/pico/pico.h +++ b/pico/pico.h @@ -213,7 +213,7 @@ void PicoDrawSetInternalBuf(void *dest, int line_increment); // draw2.c // stuff below is optional extern unsigned short *PicoCramHigh; // pointer to CRAM buff (0x40 shorts), converted to native device color (works only with 16bit for now) -extern void (*PicoPrepareCram)(); // prepares PicoCramHigh for renderer to use +extern void (*PicoPrepareCram)(void); // prepares PicoCramHigh for renderer to use // pico.c (32x) #ifndef NO_32X diff --git a/pico/pico_int.h b/pico/pico_int.h index 7225cab8..18824eb1 100644 --- a/pico/pico_int.h +++ b/pico/pico_int.h @@ -657,7 +657,7 @@ extern int DrawLineDestIncrement; // draw2.c void PicoDraw2Init(void); -PICO_INTERNAL void PicoFrameFull(); +PICO_INTERNAL void PicoFrameFull(void); // mode4.c void PicoFrameStartMode4(void); -- 2.39.5