Changes suggested after compiling with Clang.

queens.c: Changed function print's return type from int to void, since
the function does not return a value.

tt.c: Added a proper function prototype for create_test_string.

menu_toggle.c: Add a constant format sttring to call of mvprintw,
instead of passing the constructed string value as the format string.
This commit is contained in:
T. Kurt Bond
2025-01-29 12:39:49 -05:00
parent f22aa91389
commit 6d0a628da6
3 changed files with 4 additions and 4 deletions

View File

@@ -6,7 +6,7 @@
int *nqueens(int num);
int place(int current, int *position);
int print(int *positions, int num_queens);
void print(int *positions, int num_queens);
void board(WINDOW *win, int starty, int startx, int lines, int cols,
int tile_width, int tile_height);
@@ -71,7 +71,7 @@ int place(int current, int *position)
return(1);
}
int print(int *positions, int num_queens)
void print(int *positions, int num_queens)
{ int count;
int y = 2, x = 2, w = 4, h = 2;
static int solution = 1;

View File

@@ -16,7 +16,7 @@
int print_menu();
void print_byebye();
void create_test_string();
void create_test_string(char *test_array, int choice);
void print_time(time_t startt, time_t endt, int mistakes);
void print_in_middle(int startx, int starty, int width, char *string, WINDOW *win);

View File

@@ -71,7 +71,7 @@ int main()
}
move(20, 0);
clrtoeol();
mvprintw(20, 0, temp);
mvprintw(20, 0, "%s", temp);
refresh();
}
break;