Merge pull request #58 from greno4ka/fix-for-gcc10

Make gcc10 happy
This commit is contained in:
Murilo Pereira 2021-11-03 13:54:51 +01:00 committed by GitHub
commit 4cc3d9c070
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View File

@ -8,6 +8,8 @@
#include "game.h"
#include "common.h"
struct cursor *cursor;
void cursor_malloc(struct cursor **cursor) {
if (!(*cursor = malloc(sizeof(**cursor)))) {
tty_solitaire_generic_error(errno, __FILE__, __LINE__);

View File

@ -5,6 +5,8 @@
#include "deck.h"
#include "common.h"
struct deck *deck;
void deck_malloc(struct deck **deck) {
if (!(*deck = malloc(sizeof(**deck)))) {
tty_solitaire_generic_error(errno, __FILE__, __LINE__);

View File

@ -35,8 +35,8 @@ struct game {
int four_color_deck;
};
struct deck *deck;
struct cursor *cursor;
extern struct deck *deck;
extern struct cursor *cursor;
bool maneuvre_stack(struct stack *);
bool stock_stack(struct stack *);