Skip to content

Commit

Permalink
Add -Wundef to compile options
Browse files Browse the repository at this point in the history
Give a warning for undefined macros to prevent errors like esl#11.
  • Loading branch information
big-r81 authored Jan 19, 2024
1 parent d079c45 commit f389ab8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{port_env,
[
{"(linux|solaris|freebsd|netbsd|openbsd|dragonfly|darwin|gnu)",
"CFLAGS", "$CFLAGS -std=c99 -O0 -g -Wall -Wextra -fPIC -I/opt/homebrew/include -I/usr/local/include --coverage"},
"CFLAGS", "$CFLAGS -std=c99 -O0 -g -Wall -Wextra -Wundef -fPIC -I/opt/homebrew/include -I/usr/local/include --coverage"},
{"(linux|solaris|freebsd|netbsd|openbsd|dragonfly|darwin|gnu)",
"LDLIBS", "$LDLIBS -lcrypto -L/opt/homebrew/lib/ -L/usr/local/lib --coverage"}
]
Expand All @@ -30,7 +30,7 @@
{port_env,
[
{"(linux|solaris|freebsd|netbsd|openbsd|dragonfly|darwin|gnu)",
"CFLAGS", "$CFLAGS -std=c99 -O3 -g -Wall -Wextra -fPIC -I/opt/homebrew/include -I/usr/local/include"},
"CFLAGS", "$CFLAGS -std=c99 -O3 -g -Wall -Wextra -Wundef -fPIC -I/opt/homebrew/include -I/usr/local/include"},
{"(linux|solaris|freebsd|netbsd|openbsd|dragonfly|darwin|gnu)",
"LDLIBS", "$LDLIBS -lcrypto -L/opt/homebrew/lib/ -L/usr/local/lib"},
{"win32", "CFLAGS", "$CFLAGS /I${OPENSSL_INSTALL_DIR}/include /O2 /DNDEBUG /Wall"},
Expand Down

0 comments on commit f389ab8

Please sign in to comment.