Skip to content

Commit

Permalink
Use C17
Browse files Browse the repository at this point in the history
Fix the build.
  • Loading branch information
noncombatant committed May 22, 2022
1 parent f1398d3 commit 5c67065
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
CFLAGS = -Weverything -Werror -O2 -ansi -pedantic -std=c11 -Wno-padded
CC = clang
CFLAGS = -Weverything -Werror -O2 -std=c17 -Wno-padded -Wno-poison-system-directories
LDFLAGS = -lncurses

robotfindskitten: robotfindskitten.c
Expand Down
4 changes: 2 additions & 2 deletions robotfindskitten.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,13 @@ static bool RandomBold(void) {
}

static unsigned int RandomColor(void) {
return random() % 6 + 1;
return ((unsigned int)random()) % 6 + 1;
}

static chtype RandomCharacter(void) {
chtype c;
do {
c = (random() % ('~' - '!' + 1) + '!');
c = (chtype)((random() % ('~' - '!' + 1) + '!'));
} while (c == '#');
return c;
}
Expand Down

0 comments on commit 5c67065

Please sign in to comment.