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 "
|
((nil . ((compile-command . (concat "make -C "
|
||||||
(vc-root-dir)
|
(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
|
#CFLAGS += -mno-tbm
|
||||||
|
|
||||||
# release
|
# release
|
||||||
CFLAGS += -Ofast
|
CFLAGS += -O3
|
||||||
|
|
||||||
CFLAGS += -march=native
|
CFLAGS += -march=native
|
||||||
CFLAGS += -flto
|
CFLAGS += -flto
|
||||||
|
CFLAGS += -funroll-loops
|
||||||
CFLAGS += -Wall
|
CFLAGS += -Wall
|
||||||
CFLAGS += -Wextra
|
CFLAGS += -Wextra
|
||||||
|
CFLAGS += -Wshadow
|
||||||
CFLAGS += -Wmissing-declarations
|
CFLAGS += -Wmissing-declarations
|
||||||
|
|
||||||
CFLAGS := $(strip $(CFLAGS))
|
CFLAGS := $(strip $(CFLAGS))
|
||||||
|
@@ -412,22 +412,22 @@ struct fentest {
|
|||||||
{ __LINE__, 0, NULL, NULL }
|
{ __LINE__, 0, NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
static int cur = -1;
|
static int fentest_cur = -1;
|
||||||
|
|
||||||
static char *next_fen(uint module)
|
static char *next_fen(uint module)
|
||||||
{
|
{
|
||||||
cur++;
|
fentest_cur++;
|
||||||
while (fentest[cur].fen && !(fentest[cur].modules & module))
|
while (fentest[fentest_cur].fen && !(fentest[fentest_cur].modules & module))
|
||||||
cur++;
|
fentest_cur++;
|
||||||
return fentest[cur].fen;
|
return fentest[fentest_cur].fen;
|
||||||
}
|
}
|
||||||
|
|
||||||
static __unused char* cur_comment()
|
static __unused char* cur_comment()
|
||||||
{
|
{
|
||||||
return fentest[cur].comment;
|
return fentest[fentest_cur].comment;
|
||||||
}
|
}
|
||||||
|
|
||||||
static __unused int cur_line()
|
static __unused int cur_line()
|
||||||
{
|
{
|
||||||
return fentest[cur].line;
|
return fentest[fentest_cur].line;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user