Fail build when unused c code is detected
Motivation: To keep our code clean we should fail the build when unused c code is detected. Modifications: - Add '-Wunused-variable' to build flags Result: Cleaner code.
This commit is contained in:
parent
cb139043f3
commit
5fec897ef7
@ -199,7 +199,7 @@
|
||||
<value>${linux.sendmmsg.support}${glibc.sendmmsg.support}</value>
|
||||
<!-- If glibc and linux kernel are both not sufficient...then define the CFLAGS -->
|
||||
<regex>.*IO_NETTY_SENDMSSG_NOT_FOUND.*</regex>
|
||||
<replacement>CFLAGS=-O3 -DIO_NETTY_SENDMMSG_NOT_FOUND -Werror -fno-omit-frame-pointer</replacement>
|
||||
<replacement>CFLAGS=-O3 -DIO_NETTY_SENDMMSG_NOT_FOUND -Werror -fno-omit-frame-pointer -Wunused-variable</replacement>
|
||||
<failIfNoMatch>false</failIfNoMatch>
|
||||
</configuration>
|
||||
</execution>
|
||||
@ -215,7 +215,7 @@
|
||||
<value>${jni.compiler.args.cflags}</value>
|
||||
<!-- If glibc and linux kernel are both not sufficient...then define the CFLAGS -->
|
||||
<regex>^((?!CFLAGS=).)*$</regex>
|
||||
<replacement>CFLAGS=-O3 -Werror -fno-omit-frame-pointer</replacement>
|
||||
<replacement>CFLAGS=-O3 -Werror -fno-omit-frame-pointer -Wunused-variable</replacement>
|
||||
<failIfNoMatch>false</failIfNoMatch>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
Loading…
Reference in New Issue
Block a user