Skip to content

Commit 5c9dbf2

Browse files
committed
Fix prototypes of functions taking no arguments
1 parent 5a63411 commit 5c9dbf2

6 files changed

Lines changed: 11 additions & 11 deletions

File tree

src/common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#include "common.h"
77

8-
bool term_size_ok() {
8+
bool term_size_ok(void) {
99
int lines, columns;
1010
getmaxyx(stdscr, lines, columns);
1111
return(lines >= MIN_TERM_LINES && columns >= MIN_TERM_COLS);

src/common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
extern const char *program_name;
1313

1414
void tty_solitaire_generic_error(int, char *, int);
15-
bool term_size_ok();
15+
bool term_size_ok(void);
1616

1717
#endif

src/game.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,12 +222,12 @@ void game_init(struct game *game, int passes_through_deck,
222222
game->passes_through_deck_left = passes_through_deck;
223223
}
224224

225-
void game_end() {
225+
void game_end(void) {
226226
cursor_free(cursor);
227227
deck_free(deck);
228228
}
229229

230-
bool game_won() {
230+
bool game_won(void) {
231231
// If any card in the maneuvre stacks is covered, game is not won.
232232
for (int i = 0; i < MANEUVRE_STACKS_NUMBER; i++) {
233233
for (struct stack *j = deck->maneuvre[i]; j != NULL; j = j->next) {

src/game.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ bool valid_move(struct stack *, struct stack *);
4545
void move_card(struct stack **, struct stack **);
4646
void move_block(struct stack **, struct stack **, int);
4747
void game_init(struct game *, int, int);
48-
bool game_won();
49-
void game_end();
48+
bool game_won(void);
49+
void game_end(void);
5050

5151
#endif

src/keyboard.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include "gui.h"
1111
#include "common.h"
1212

13-
static void handle_term_resize() {
13+
static void handle_term_resize(void) {
1414
clear();
1515
refresh();
1616
if (term_size_ok()) {

src/ttysolitaire.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
const char *program_name;
1717
struct game game;
1818

19-
void version();
19+
void version(void);
2020
void usage(const char *);
21-
void draw_greeting();
21+
void draw_greeting(void);
2222

2323
int main(int argc, char *argv[]) {
2424
int option;
@@ -129,7 +129,7 @@ int main(int argc, char *argv[]) {
129129
return (0);
130130
}
131131

132-
void draw_greeting() {
132+
void draw_greeting(void) {
133133
mvprintw(8, 26, "Welcome to tty-solitaire.");
134134
mvprintw(10, 21, "Move with the arrow keys or <hjkl>.");
135135
mvprintw(12, 18, "Use the space bar to select and place cards.");
@@ -150,4 +150,4 @@ void usage(const char *program_name) {
150150
"(default: false)\n");
151151
}
152152

153-
void version() { printf("%s\n", VERSION); }
153+
void version(void) { printf("%s\n", VERSION); }

0 commit comments

Comments
 (0)