Project

General

Profile

Actions

Bug #2679

closed

build with profiling enabled on generates compile warnings

Added by Jason Taylor almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Low
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

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

Actions #1

Updated by Jason Taylor almost 6 years ago

  • Affected Versions 4.1 added
  • Affected Versions deleted (4.0beta1)
Actions #2

Updated by Victor Julien almost 6 years ago

  • Status changed from New to Assigned
  • Assignee set to Jason Taylor
  • Target version set to 4.1.1
Actions #3

Updated by Jason Taylor almost 6 years ago

  • Status changed from Assigned to Closed
Actions

Also available in: Atom PDF