Fix FTBFS caused by invalid cast. This resolves issue #38.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/39/head
Michele Calgaro 7 months ago
parent 7494cc4407
commit d45d96cd06
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -518,7 +518,7 @@ int freecell_solver_user_cmd_line_parse_args_with_file_nesting_count(
{
int a;
const char * start_num;
char * end_num;
const char * end_num;
char * num_copy;
start_num = argv[arg];
for(a=0;a<5;a++)
@ -642,7 +642,7 @@ int freecell_solver_user_cmd_line_parse_args_with_file_nesting_count(
*last_arg = arg-1;
return FCS_CMD_LINE_PARAM_WITH_NO_ARG;
}
freecell_solver_user_set_soft_thread_name(instance, argv[arg]);
freecell_solver_user_set_soft_thread_name(instance, (char*)argv[arg]);
}
else if ((!strcmp(argv[arg], "--prelude")))
{
@ -652,7 +652,7 @@ int freecell_solver_user_cmd_line_parse_args_with_file_nesting_count(
*last_arg = arg-1;
return FCS_CMD_LINE_PARAM_WITH_NO_ARG;
}
freecell_solver_user_set_hard_thread_prelude(instance, argv[arg]);
freecell_solver_user_set_hard_thread_prelude(instance, (char*)argv[arg]);
}
else if ((!strcmp(argv[arg], "-opt-to")) || (!strcmp(argv[arg], "--optimization-tests-order")))
{
@ -746,7 +746,8 @@ int freecell_solver_user_cmd_line_parse_args_with_file_nesting_count(
else
{
int num_to_skip = 0;
char * s, * buffer;
const char * s;
char * buffer;
FILE * f;
long file_len;
int ret;
@ -842,7 +843,7 @@ int freecell_solver_user_cmd_line_parse_args_with_file_nesting_count(
ret = freecell_solver_user_cmd_line_parse_args_with_file_nesting_count(
instance,
args_man->argc - num_to_skip,
args_man->argv + num_to_skip,
(const char **)(args_man->argv + num_to_skip),
0,
known_parameters,
callback,
@ -879,7 +880,7 @@ int freecell_solver_user_cmd_line_parse_args_with_file_nesting_count(
args_man_t * preset_args = 0;
char * dir = NULL;
status = read_preset(argv[arg], &preset_args, &dir, NULL);
status = read_preset((char*)argv[arg], &preset_args, &dir, NULL);
if (status != 0)
{
char * err_str;
@ -896,7 +897,7 @@ int freecell_solver_user_cmd_line_parse_args_with_file_nesting_count(
ret = freecell_solver_user_cmd_line_parse_args_with_file_nesting_count(
instance,
preset_args->argc,
preset_args->argv,
(const char**)preset_args->argv,
0,
known_parameters,
callback,

@ -12,7 +12,7 @@ typedef int (*freecell_solver_user_cmd_line_known_commands_callback_t)
(
void * instance,
int argc,
char * argv[],
const char * argv[],
int arg_index,
int * num_to_skip,
int * ret,

Loading…
Cancel
Save