diff --git a/Makefile b/Makefile index d62b121..726515c 100644 --- a/Makefile +++ b/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 diff --git a/ace.c b/ace.c index 07b12e2..74c9f5a 100644 --- a/ace.c +++ b/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;