Caught this since by compiling this file with -Wall, -Werror.
../tests/tcg/aarch64/system/../../multiarch/system/memory.c: In function
‘init_test_data_s8’:
../tests/tcg/aarch64/system/../../multiarch/system/memory.c:97:18: error:
unused variable ‘bottom’ [-Werror=unused-variable]
97 | uint8_t top, bottom, *ptr = &test_data[0];
| ^~~~~~
../tests/tcg/aarch64/system/../../multiarch/system/memory.c:97:13: error:
unused variable ‘top’ [-Werror=unused-variable]
97 | uint8_t top, bottom, *ptr = &test_data[0];
| ^~~
../tests/tcg/aarch64/system/../../multiarch/system/memory.c: In function
‘read_test_data_s8’:
../tests/tcg/aarch64/system/../../multiarch/system/memory.c:384:14: error:
unused variable ‘ok’ [-Werror=unused-variable]
384 | bool ok;
|
Signed-off-by: Pierrick Bouvier <[email protected]>
---
tests/tcg/multiarch/system/memory.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tests/tcg/multiarch/system/memory.c
b/tests/tcg/multiarch/system/memory.c
index 7508f6b916d..adc7ac60c1f 100644
--- a/tests/tcg/multiarch/system/memory.c
+++ b/tests/tcg/multiarch/system/memory.c
@@ -94,7 +94,7 @@ static inline uint8_t get_byte(int index, bool neg)
static void init_test_data_s8(bool neg_first)
{
- uint8_t top, bottom, *ptr = &test_data[0];
+ uint8_t *ptr = &test_data[0];
int i;
ml_printf("Filling test area with s8 pairs (%s):",
@@ -381,7 +381,6 @@ static bool read_test_data_s8(int offset, bool neg_first)
for (i = 0; i < max; i++) {
int16_t first, second;
- bool ok;
first = *ptr++;
second = *ptr++;
--
2.43.0