Skip to content

Commit

Permalink
Fix compiler warning: a function declaration without a prototype is d…
Browse files Browse the repository at this point in the history
…eprecated

Signed-off-by: Steffen Pankratz <[email protected]>
  • Loading branch information
kratz00 committed Jan 30, 2023
1 parent 4ffc320 commit 9817c0b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion PuyoDoomMelt.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#define COL_WIDTH 8
#define NUM_COLS SCREEN_WIDTH / COL_WIDTH + 1

static int rand_fun () {
static int rand_fun (void) {
return rand() % 256;
}

Expand Down
6 changes: 3 additions & 3 deletions audio.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "audio.h"
#include <string.h>
#include <SDL_timer.h>
#include "audio.h"
#include <stdbool.h>

extern char *dataFolder;
Expand Down Expand Up @@ -54,7 +54,7 @@ static Mix_Music *CustomMix_LoadMUS(const char *path, const char *fileName)
#endif

void
audio_init ()
audio_init (void)
{
#ifdef USE_AUDIO
int audio_rate;
Expand Down Expand Up @@ -133,7 +133,7 @@ audio_sound_play (Sound * s)
}

void
audio_close ()
audio_close (void)
{
#ifdef USE_AUDIO
if (!sound_supported) return;
Expand Down
4 changes: 2 additions & 2 deletions audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ extern Sound *sound_yahoohoo3[NB_YAHOOHOO3];
extern Sound *sound_splash[8];
extern Sound *sound_bim[2];

void audio_init ();
void audio_init (void);
void audio_music_start (int num);
void audio_sound_play (Sound * s);
void audio_close ();
void audio_close (void);

/// volume compris entre 0 et 100;
void audio_music_set_volume (int vol);
Expand Down
4 changes: 2 additions & 2 deletions sofont.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ SoFont_FontHeight (SoFont * font)
}

int
SoFont_getMinChar ()
SoFont_getMinChar (void)
{
return START_CHAR;
}
Expand All @@ -38,7 +38,7 @@ SoFont_getMaxChar (SoFont * font)


SoFont *
SoFont_new ()
SoFont_new (void)
{
SoFont *font = (SoFont *) malloc (sizeof (SoFont));

Expand Down
4 changes: 2 additions & 2 deletions sofont.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

typedef struct _SOFONT SoFont;

SoFont *SoFont_new ();
SoFont *SoFont_new (void);
void SoFont_free (SoFont * font);

int SoFont_load (SoFont * font, IIM_Surface * FontSurface);
Expand Down Expand Up @@ -95,7 +95,7 @@ int SoFont_CleverTextCursorAt (SoFont * font, const char *text, int px,
int cursPos, SDL_Rect * r);

#define START_CHAR 33
int SoFont_getMinChar ();
int SoFont_getMinChar (void);
int SoFont_getMaxChar (SoFont * font);

#endif

0 comments on commit 9817c0b

Please sign in to comment.