Update CLFAGS and resolve compiler warnings
This commit is contained in:
parent
08bf232b7f
commit
dddb133a62
2 changed files with 4 additions and 4 deletions
2
Makefile
2
Makefile
|
@ -6,7 +6,7 @@ TARGET = ace
|
|||
PREFIX ?= /usr/local
|
||||
BINDIR = $(PREFIX)/bin
|
||||
|
||||
CFLAGS = -O3 -march=native -mtune=native -pipe -s -std=c99 -flto -pedantic -Wall
|
||||
CFLAGS = -Os -march=native -mtune=native -pipe -s -std=c99 -flto -pedantic -Wall
|
||||
|
||||
SRC = ace.c
|
||||
|
||||
|
|
6
ace.c
6
ace.c
|
@ -13,13 +13,13 @@ typedef struct {
|
|||
int suit; /* 0 to 3 (Hearts, Spades, Diamonds, Clubs) */
|
||||
} card;
|
||||
|
||||
card deal_card();
|
||||
card deal_card(void);
|
||||
int calculate_score(card hand[], int num_cards);
|
||||
void display_hand(card hand[], int num_cards, int is_player, int total);
|
||||
|
||||
struct termios orig_termios;
|
||||
|
||||
int main()
|
||||
int main(void)
|
||||
{
|
||||
srand(time(NULL));
|
||||
|
||||
|
@ -111,7 +111,7 @@ int main()
|
|||
return 0;
|
||||
}
|
||||
|
||||
card deal_card()
|
||||
card deal_card(void)
|
||||
{
|
||||
card card;
|
||||
card.value = rand() % 13 + 1;
|
||||
|
|
Loading…
Reference in a new issue