build : fix most gcc and clang warnings (#2861)
* fix most gcc and clang warnings * baby-llama : remove commented opt_params_adam * fix some MinGW warnings * fix more MinGW warnings
This commit is contained in:
parent
d8d6977f48
commit
ef15649972
9 changed files with 30 additions and 22 deletions
7
Makefile
7
Makefile
|
@ -91,9 +91,14 @@ endif # LLAMA_DISABLE_LOGS
|
|||
|
||||
# warnings
|
||||
CFLAGS += -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith \
|
||||
-Wmissing-prototypes -Werror=implicit-int
|
||||
-Wmissing-prototypes -Werror=implicit-int -Wno-unused-function
|
||||
CXXFLAGS += -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar
|
||||
|
||||
ifeq '' '$(findstring clang++,$(CXX))'
|
||||
# g++ only
|
||||
CXXFLAGS += -Wno-format-truncation
|
||||
endif
|
||||
|
||||
# OS specific
|
||||
# TODO: support Windows
|
||||
ifeq ($(UNAME_S),Linux)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue