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
ecdb2feff4
commit
140f36c67f
@ -201,7 +201,7 @@
|
|||||||
<value>${linux.sendmmsg.support}${glibc.sendmmsg.support}</value>
|
<value>${linux.sendmmsg.support}${glibc.sendmmsg.support}</value>
|
||||||
<!-- If glibc and linux kernel are both not sufficient...then define the CFLAGS -->
|
<!-- If glibc and linux kernel are both not sufficient...then define the CFLAGS -->
|
||||||
<regex>.*IO_NETTY_SENDMSSG_NOT_FOUND.*</regex>
|
<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>
|
<failIfNoMatch>false</failIfNoMatch>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
@ -217,7 +217,7 @@
|
|||||||
<value>${jni.compiler.args.cflags}</value>
|
<value>${jni.compiler.args.cflags}</value>
|
||||||
<!-- If glibc and linux kernel are both not sufficient...then define the CFLAGS -->
|
<!-- If glibc and linux kernel are both not sufficient...then define the CFLAGS -->
|
||||||
<regex>^((?!CFLAGS=).)*$</regex>
|
<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>
|
<failIfNoMatch>false</failIfNoMatch>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user