summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2024-04-14 21:59:22 +0900
committerMichele Calgaro <[email protected]>2024-04-15 09:19:34 +0900
commitd45d96cd06c742aec04ef51b17bc8b92c2439302 (patch)
tree6d287304f6e11361e9fea3b2d6961a2252a361a5
parent7494cc4407746240f2c06d7a14d6567492d5f693 (diff)
downloadtdegames-d45d96cd06c742aec04ef51b17bc8b92c2439302.tar.gz
tdegames-d45d96cd06c742aec04ef51b17bc8b92c2439302.zip
Fix FTBFS caused by invalid cast. This resolves issue #38.
Signed-off-by: Michele Calgaro <[email protected]>
-rw-r--r--kpat/freecell-solver/cmd_line.c15
-rw-r--r--kpat/freecell-solver/fcs_cl.h2
2 files changed, 9 insertions, 8 deletions
diff --git a/kpat/freecell-solver/cmd_line.c b/kpat/freecell-solver/cmd_line.c
index 63fbf6c9..2eaf524c 100644
--- a/kpat/freecell-solver/cmd_line.c
+++ b/kpat/freecell-solver/cmd_line.c
@@ -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,
diff --git a/kpat/freecell-solver/fcs_cl.h b/kpat/freecell-solver/fcs_cl.h
index e739c98e..6dafaec6 100644
--- a/kpat/freecell-solver/fcs_cl.h
+++ b/kpat/freecell-solver/fcs_cl.h
@@ -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,