Bug #2679
closedbuild with profiling enabled on generates compile warnings
Description
When building the current master branch.
On fedora when using the following configure:
./configure --enable-gccprotect --enable-pie --disable-coccinelle --enable-nfqueue --enable-af-packet --with-libnspr-includes=/usr/include/nspr4 --with-libnss-includes=/usr/include/nss3 --enable-jansson --enable-geoip --enable-lua --enable-rust --enable-debug --enable-profiling
During 'make' the following is seen:
CC util-profiling.o
util-profiling.c: In function ‘SCProfilingDumpPacketStats’:
util-profiling.c:716:19: warning: iteration 256 invokes undefined behavior [-Waggressive-loop-optimizations]
if (pd->cnt == 0) {
~^~~~
util-profiling.c:713:9: note: within this loop
for (p = 0; p < 257; p++) {
~
util-profiling.c:699:19: warning: iteration 256 invokes undefined behavior [-Waggressive-loop-optimizations]
if (pd->cnt == 0) {
~~~~
util-profiling.c:696:9: note: within this loop
for (p = 0; p < 257; p++) {
~
util-profiling.c:684:24: warning: iteration 256 invokes undefined behavior [-Waggressive-loop-optimizations]
total = pd->tot;
~~~~
util-profiling.c:682:9: note: within this loop
for (p = 0; p < 257; p+) {
^~~
CC util-profiling-keywords.o
Updated by Jason Taylor about 6 years ago
- Affected Versions 4.1 added
- Affected Versions deleted (
4.0beta1)
Updated by Victor Julien about 6 years ago
- Status changed from New to Assigned
- Assignee set to Jason Taylor
- Target version set to 4.1.1
Updated by Jason Taylor about 6 years ago
- Status changed from Assigned to Closed