diff options
author | Matias Elo <matias.elo@nokia.com> | 2022-10-04 16:59:54 +0300 |
---|---|---|
committer | Matias Elo <matias.elo@nokia.com> | 2022-10-11 15:59:21 +0300 |
commit | 137a8797228c85e157d952fed6240d0badcff854 (patch) | |
tree | 4041ff31a0cad25369786c7f73355a93b6c5abef /test | |
parent | 75e922c70c4ade0476a34aece7df261ce0f56604 (diff) |
test: performance: scheduling: fix array-bounds build error
Fix invalid 'array-bounds' error in GCC-9 -O3 build.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/performance/odp_scheduling.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/performance/odp_scheduling.c b/test/performance/odp_scheduling.c index c9cf2c616..f9c083c92 100644 --- a/test/performance/odp_scheduling.c +++ b/test/performance/odp_scheduling.c @@ -145,6 +145,7 @@ static int enqueue_events(int thr, int prio, int num_queues, int num_events, if (ret != num_events) { ODPH_ERR(" [%i] buffer alloc failed\n", thr); ret = ret < 0 ? 0 : ret; + ret = ret > num_events ? num_events : ret; /* GCC-9 -O3 workaround */ odp_buffer_free_multi(buf, ret); return -1; } |