add CFLAGS -Wshadow and -funroll-loops, fix related common-test.h
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
((nil . ((compile-command . (concat "make -C "
|
||||
(vc-root-dir)
|
||||
" -k -j2 testing")))))
|
||||
" -k -j4 testing")))))
|
||||
|
4
Makefile
4
Makefile
@@ -97,12 +97,14 @@ CFLAGS += -ginline-points # inlined funcs debu
|
||||
#CFLAGS += -mno-tbm
|
||||
|
||||
# release
|
||||
CFLAGS += -Ofast
|
||||
CFLAGS += -O3
|
||||
|
||||
CFLAGS += -march=native
|
||||
CFLAGS += -flto
|
||||
CFLAGS += -funroll-loops
|
||||
CFLAGS += -Wall
|
||||
CFLAGS += -Wextra
|
||||
CFLAGS += -Wshadow
|
||||
CFLAGS += -Wmissing-declarations
|
||||
|
||||
CFLAGS := $(strip $(CFLAGS))
|
||||
|
@@ -412,22 +412,22 @@ struct fentest {
|
||||
{ __LINE__, 0, NULL, NULL }
|
||||
};
|
||||
|
||||
static int cur = -1;
|
||||
static int fentest_cur = -1;
|
||||
|
||||
static char *next_fen(uint module)
|
||||
{
|
||||
cur++;
|
||||
while (fentest[cur].fen && !(fentest[cur].modules & module))
|
||||
cur++;
|
||||
return fentest[cur].fen;
|
||||
fentest_cur++;
|
||||
while (fentest[fentest_cur].fen && !(fentest[fentest_cur].modules & module))
|
||||
fentest_cur++;
|
||||
return fentest[fentest_cur].fen;
|
||||
}
|
||||
|
||||
static __unused char* cur_comment()
|
||||
{
|
||||
return fentest[cur].comment;
|
||||
return fentest[fentest_cur].comment;
|
||||
}
|
||||
|
||||
static __unused int cur_line()
|
||||
{
|
||||
return fentest[cur].line;
|
||||
return fentest[fentest_cur].line;
|
||||
}
|
||||
|
Reference in New Issue
Block a user