summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2024-04-14 21:59:22 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2024-04-15 09:31:46 +0900
commit125229524882991d571c1558d3bfc41c7a0daab9 (patch)
tree5141f3c13e838864164645ce08b6a76dd8b830fa
parent6a21e1332fc194c8629a345963cf2f14d77bdb24 (diff)
downloadtdegames-125229524882991d571c1558d3bfc41c7a0daab9.tar.gz
tdegames-125229524882991d571c1558d3bfc41c7a0daab9.zip
Fix FTBFS caused by invalid cast. This resolves issue #38.r14.1.2
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit d45d96cd06c742aec04ef51b17bc8b92c2439302)
-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,