50eea2bfa7
GCC 11 complains that 'a' is uninitialized.
../dpdk/app/test/test_prefetch.c: In function 'test_prefetch':
../dpdk/app/test/test_prefetch.c:25:9:
error: 'a' may be used uninitialized [-Werror=maybe-uninitialized]
25 | rte_prefetch0(&a);
| ^~~~~~~~~~~~~~~~~
Fix by initializing 'a'.
Bugzilla ID: 714
Fixes: af75078fec
("first public release")
Cc: stable@dpdk.org
Reported-by: Ali Alnubani <alialnu@nvidia.com>
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Tested-by: Ali Alnubani <alialnu@nvidia.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
39 lines
609 B
C
39 lines
609 B
C
/* SPDX-License-Identifier: BSD-3-Clause
|
|
* Copyright(c) 2010-2014 Intel Corporation
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include <stdint.h>
|
|
|
|
#include <rte_prefetch.h>
|
|
|
|
#include "test.h"
|
|
|
|
/*
|
|
* Prefetch test
|
|
* =============
|
|
*
|
|
* - Just test that the macro can be called and validate the compilation.
|
|
* The test always return success.
|
|
*/
|
|
|
|
static int
|
|
test_prefetch(void)
|
|
{
|
|
int a = 0;
|
|
|
|
rte_prefetch0(&a);
|
|
rte_prefetch1(&a);
|
|
rte_prefetch2(&a);
|
|
|
|
rte_prefetch0_write(&a);
|
|
rte_prefetch1_write(&a);
|
|
rte_prefetch2_write(&a);
|
|
|
|
rte_cldemote(&a);
|
|
|
|
return 0;
|
|
}
|
|
|
|
REGISTER_TEST_COMMAND(prefetch_autotest, test_prefetch);
|