Skip to content

Commit

Permalink
Fix Clang warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ccmywish committed Dec 10, 2024
1 parent 4ecdc7f commit 08fbdb6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/framework/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@ query_program_exist (char *check_cmd, char *prog_name, int mode)
{
// xy_warn (xy_strjoin(4, "× 命令 ", progname, " 不存在,", buf));
log_check_result (prog_name, msg, false);
return false;
}
return false;
}
else
{
Expand Down Expand Up @@ -1305,6 +1305,7 @@ static char *
chsrc_get_cpuarch ()
{
char *ret;
char *msg;

#if XY_On_Windows
SYSTEM_INFO info;
Expand All @@ -1322,10 +1323,11 @@ chsrc_get_cpuarch ()
ret = "IA-64"; break;
case PROCESSOR_ARCHITECTURE_UNKNOWN:
default:
char *msg = CliOpt_InEnglish ? "Unable to detect CPU type" : "无法检测到CPU类型";
msg = CliOpt_InEnglish ? "Unable to detect CPU type" : "无法检测到CPU类型";
chsrc_error (msg);
exit (Exit_UserCause);
}
return ret;
#else

bool exist;
Expand All @@ -1345,7 +1347,7 @@ chsrc_get_cpuarch ()
}
else
{
char *msg = CliOpt_InEnglish ? "Unable to detect CPU type" : "无法检测到CPU类型";
msg = CliOpt_InEnglish ? "Unable to detect CPU type" : "无法检测到CPU类型";
chsrc_error (msg);
exit (Exit_UserCause);
}
Expand Down

0 comments on commit 08fbdb6

Please sign in to comment.