Skip to content

Commit 08fbdb6

Browse files
committed
Fix Clang warnings
1 parent 4ecdc7f commit 08fbdb6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/framework/core.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@ query_program_exist (char *check_cmd, char *prog_name, int mode)
245245
{
246246
// xy_warn (xy_strjoin(4, "× 命令 ", progname, " 不存在,", buf));
247247
log_check_result (prog_name, msg, false);
248-
return false;
249248
}
249+
return false;
250250
}
251251
else
252252
{
@@ -1305,6 +1305,7 @@ static char *
13051305
chsrc_get_cpuarch ()
13061306
{
13071307
char *ret;
1308+
char *msg;
13081309

13091310
#if XY_On_Windows
13101311
SYSTEM_INFO info;
@@ -1322,10 +1323,11 @@ chsrc_get_cpuarch ()
13221323
ret = "IA-64"; break;
13231324
case PROCESSOR_ARCHITECTURE_UNKNOWN:
13241325
default:
1325-
char *msg = CliOpt_InEnglish ? "Unable to detect CPU type" : "无法检测到CPU类型";
1326+
msg = CliOpt_InEnglish ? "Unable to detect CPU type" : "无法检测到CPU类型";
13261327
chsrc_error (msg);
13271328
exit (Exit_UserCause);
13281329
}
1330+
return ret;
13291331
#else
13301332

13311333
bool exist;
@@ -1345,7 +1347,7 @@ chsrc_get_cpuarch ()
13451347
}
13461348
else
13471349
{
1348-
char *msg = CliOpt_InEnglish ? "Unable to detect CPU type" : "无法检测到CPU类型";
1350+
msg = CliOpt_InEnglish ? "Unable to detect CPU type" : "无法检测到CPU类型";
13491351
chsrc_error (msg);
13501352
exit (Exit_UserCause);
13511353
}

0 commit comments

Comments
 (0)