nissy-fmc

A Rubik's cube FMC assistant
git clone https://git.tronto.net/nissy-fmc
Download | Log | Files | Refs | README | LICENSE

commit 24b790ac81b0a7a9ca6f71564e066a978981b866
parent b57c17fde23cb8aece148eda9a9b816cb56d836b
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date:   Sat,  6 May 2023 14:40:04 +0200

Addressed clang warning not present in gcc

Diffstat:
MMakefile | 2+-
Msrc/cube.c | 10+++++-----
Msrc/cube.h | 2+-
Msrc/main.c | 2+-
Msrc/nissy.c | 2+-
Msrc/nissy.h | 2+-
6 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/Makefile b/Makefile @@ -10,7 +10,7 @@ DBFLAGS = -std=c99 -pedantic -Wall -Wextra -Wno-unused-parameter \ -Wno-unused-function -fsanitize=address -fsanitize=undefined \ -g3 ${CPPFLAGS} -CC = cc +CC = clang all: nissy diff --git a/src/cube.c b/src/cube.c @@ -3,8 +3,8 @@ static void apply_permutation(int *, int *, int, int *); static void sum_arrays_mod(int *, int *, int, int); static Move read_move(char *, int *); -static void init_moves(); -static void init_trans(); +static void init_moves(void); +static void init_trans(void); static Cube move_array[NMOVES]; Move moves_ttable[NTRANS][NMOVES]; @@ -400,7 +400,7 @@ transform_trans(Trans t, Trans m) } static void -init_moves() { +init_moves(void) { Move m; /* Moves are represented as cubes and applied using compose(). @@ -509,7 +509,7 @@ init_moves() { } static void -init_trans() { +init_trans(void) { Cube aux, cube; Move mi, move; Trans t, u, v; @@ -557,7 +557,7 @@ init_trans() { } void -init_cube() +init_cube(void) { init_moves(); init_trans(); diff --git a/src/cube.h b/src/cube.h @@ -64,4 +64,4 @@ void transform_alg(Trans, Alg *); Move transform_move(Trans, Move); Trans transform_trans(Trans, Trans); -void init_cube(); +void init_cube(void); diff --git a/src/main.c b/src/main.c @@ -37,7 +37,7 @@ main(int argc, char *argv[]) fprintf(stderr, "Error applying scramble: %s\n", scramble); return -1; default: - printf(sols); + printf("%s", sols); } return 0; diff --git a/src/nissy.c b/src/nissy.c @@ -94,7 +94,7 @@ nissy_solve(char *step, char *trans, int d, char *type, char *scramble, char *so } void -nissy_init() +nissy_init(void) { int i; diff --git a/src/nissy.h b/src/nissy.h @@ -1,5 +1,5 @@ /* TODO: this should take a char *buffer as parameter, not read files */ -void nissy_init(); +void nissy_init(void); /* Returns 0 on success, 1-based index of bad arg on failure */ int nissy_solve(char *s, char *trans, int d, char *type, char *scr, char *sol);