mirror of
https://github.com/RubyMetric/chsrc.git
synced 2025-03-10 12:35:17 +08:00
Add warnings
This commit is contained in:
parent
1ab8b7c8e5
commit
88141b67fd
10
Makefile
10
Makefile
@ -6,10 +6,10 @@
|
||||
# Contributors : Yangmoooo <yangmoooo@outlook.com>
|
||||
# |
|
||||
# Created On : <2023-08-28>
|
||||
# Last Modified : <2024-12-14>
|
||||
# Last Modified : <2024-12-27>
|
||||
# --------------------------------------------------------------
|
||||
|
||||
CFLAGS = -Iinclude -Ilib # -Wall
|
||||
CFLAGS += -Iinclude -Ilib # -Wall
|
||||
|
||||
# 只有Windows会定义该变量
|
||||
ifeq ($(OS), Windows_NT)
|
||||
@ -22,13 +22,17 @@ ifeq ($(shell uname), Linux)
|
||||
CFLAGS += -static
|
||||
endif
|
||||
|
||||
override WARN += -Wall -Wextra -Wno-unused-variable -Wno-unused-function -Wno-missing-braces -Wno-misleading-indentation \
|
||||
-Wno-missing-field-initializers -Wno-unused-parameter -Wno-sign-compare
|
||||
_C_Warning_Flags := $(WARN)
|
||||
|
||||
Target = chsrc
|
||||
|
||||
CI_Build_Name = chsrc
|
||||
#=======================
|
||||
|
||||
all:
|
||||
@$(CC) src/chsrc-main.c $(CFLAGS) -o $(Target)
|
||||
@$(CC) src/chsrc-main.c $(CFLAGS) $(_C_Warning_Flags) -o $(Target)
|
||||
@echo; echo Compile done using \'$(CC)\' $(CFLAGS)
|
||||
|
||||
CI: all
|
||||
|
@ -561,7 +561,7 @@ get_max_ele_idx_in_dbl_ary (double *array, int size)
|
||||
void
|
||||
measure_speed_for_every_source (Source_t sources[], int size, double speed_records[])
|
||||
{
|
||||
bool get_measured[size]; /* 是否真正执行了测速 */
|
||||
// bool get_measured[size]; /* 是否真正执行了测速 */
|
||||
int get_measured_n = 0; /* 测速了几个 */
|
||||
char *measure_msgs[size];
|
||||
|
||||
@ -587,7 +587,7 @@ measure_speed_for_every_source (Source_t sources[], int size, double speed_recor
|
||||
speed = 0;
|
||||
|
||||
speed_records[i] = speed;
|
||||
get_measured[i] = false;
|
||||
// get_measured[i] = false;
|
||||
measure_msgs[i] = NULL;
|
||||
}
|
||||
|
||||
@ -613,7 +613,7 @@ measure_speed_for_every_source (Source_t sources[], int size, double speed_recor
|
||||
/* 不测速的 Provider */
|
||||
speed = 0;
|
||||
}
|
||||
get_measured[i] = false;
|
||||
// get_measured[i] = false;
|
||||
speed_records[i] = speed;
|
||||
|
||||
const char *msg = CliOpt_InEnglish ? provider->abbr : provider->name;
|
||||
|
Loading…
x
Reference in New Issue
Block a user