Skip to contentSkip to conversation

gcc12 build error, app/test-flow-perf

dpdk-dev [email protected] 1 participant 2 messages Oct 28, 2021 – Jun 15, 2022

lore
Share & tools
lore
#0 lore raw

https://bugs.dpdk.org/show_bug.cgi?id=856

            Bug ID: 856
           Summary: gcc12 build error, app/test-flow-perf
           Product: DPDK
           Version: 20.11
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: other
          Assignee: [email protected]
          Reporter: [email protected]

Target Milestone: ---

With gcc 12.0.0 "gcc (GCC) 12.0.0 20211024 (experimental)"

[1/2] Compiling C object app/dpdk-test-flow-perf.p/test-flow-perf_main.c.o ../app/test-flow-perf/main.c: In function ‘start_forwarding’:
../app/test-flow-perf/main.c:1565:28: warning: ‘sprintf’ may write a terminating nul past the end of the destination [-Wformat-overflow=]
1565 | sprintf(p[i++], "%d", (int)n);
| ^
In function ‘pretty_number’,
inlined from ‘packet_per_second_stats’ at
../app/test-flow-perf/main.c:1620:4,
inlined from ‘start_forwarding’ at ../app/test-flow-perf/main.c:1659:3:
../app/test-flow-perf/main.c:1565:9: note: ‘sprintf’ output between 2 and 5 bytes into a destination of size 4

 1565 |         sprintf(p[i++], "%d", (int)n);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~             

../app/test-flow-perf/main.c: In function ‘start_forwarding’:
../app/test-flow-perf/main.c:1565:28: warning: ‘sprintf’ may write a terminating nul past the end of the destination [-Wformat-overflow=]
1565 | sprintf(p[i++], "%d", (int)n);
| ^
In function ‘pretty_number’,
inlined from ‘packet_per_second_stats’ at
../app/test-flow-perf/main.c:1620:4,
inlined from ‘start_forwarding’ at ../app/test-flow-perf/main.c:1659:3:
../app/test-flow-perf/main.c:1565:9: note: ‘sprintf’ output between 2 and 5 bytes into a destination of size 4

 1565 |         sprintf(p[i++], "%d", (int)n);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../app/test-flow-perf/main.c: In function ‘start_forwarding’:
../app/test-flow-perf/main.c:1565:28: warning: ‘sprintf’ may write a terminating nul past the end of the destination [-Wformat-overflow=]
1565 | sprintf(p[i++], "%d", (int)n);
| ^
In function ‘pretty_number’,
inlined from ‘packet_per_second_stats’ at
../app/test-flow-perf/main.c:1620:4,
inlined from ‘start_forwarding’ at ../app/test-flow-perf/main.c:1659:3:
../app/test-flow-perf/main.c:1565:9: note: ‘sprintf’ output between 2 and 5 bytes into a destination of size 4

 1565 |         sprintf(p[i++], "%d", (int)n);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../app/test-flow-perf/main.c: In function ‘start_forwarding’:
../app/test-flow-perf/main.c:1565:28: warning: ‘sprintf’ may write a terminating nul past the end of the destination [-Wformat-overflow=]
1565 | sprintf(p[i++], "%d", (int)n);
| ^
In function ‘pretty_number’,
inlined from ‘packet_per_second_stats’ at
../app/test-flow-perf/main.c:1634:4,
inlined from ‘start_forwarding’ at ../app/test-flow-perf/main.c:1659:3:
../app/test-flow-perf/main.c:1565:9: note: ‘sprintf’ output between 2 and 5 bytes into a destination of size 4

 1565 |         sprintf(p[i++], "%d", (int)n);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../app/test-flow-perf/main.c: In function ‘start_forwarding’:
../app/test-flow-perf/main.c:1565:28: warning: ‘sprintf’ may write a terminating nul past the end of the destination [-Wformat-overflow=]
1565 | sprintf(p[i++], "%d", (int)n);
| ^
In function ‘pretty_number’,
inlined from ‘packet_per_second_stats’ at
../app/test-flow-perf/main.c:1634:4,
inlined from ‘start_forwarding’ at ../app/test-flow-perf/main.c:1659:3:
../app/test-flow-perf/main.c:1565:9: note: ‘sprintf’ output between 2 and 5 bytes into a destination of size 4

 1565 |         sprintf(p[i++], "%d", (int)n);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../app/test-flow-perf/main.c: In function ‘start_forwarding’:
../app/test-flow-perf/main.c:1565:28: warning: ‘sprintf’ may write a terminating nul past the end of the destination [-Wformat-overflow=]
1565 | sprintf(p[i++], "%d", (int)n);
| ^
In function ‘pretty_number’,
inlined from ‘packet_per_second_stats’ at
../app/test-flow-perf/main.c:1634:4,
inlined from ‘start_forwarding’ at ../app/test-flow-perf/main.c:1659:3:
../app/test-flow-perf/main.c:1565:9: note: ‘sprintf’ output between 2 and 5 bytes into a destination of size 4

 1565 |         sprintf(p[i++], "%d", (int)n);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.
#1 lore raw

https://bugs.dpdk.org/show_bug.cgi?id=856

David Marchand ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------

                 CC|                            |[email protected]
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from David Marchand ([email protected]) --- Fixed in https://git.dpdk.org/dpdk/commit/?id=5fc2eece8d45

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.