diff options
author | Alan Modra <amodra@gmail.com> | 2021-11-15 13:02:26 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2021-11-15 13:26:17 +1030 |
commit | daad0428f27f8379948fa85c951c72ffc16b27d4 (patch) | |
tree | 485acac2b17774be456e808fce73216611403715 /gold/testsuite/script_test_2.cc | |
parent | 7aba54da426b9999085d8f84e7896b8afdbb9ca6 (diff) | |
download | binutils-daad0428f27f8379948fa85c951c72ffc16b27d4.zip binutils-daad0428f27f8379948fa85c951c72ffc16b27d4.tar.gz binutils-daad0428f27f8379948fa85c951c72ffc16b27d4.tar.bz2 |
-Waddress fixes for gold testsuite
Current mainline gcc.
common_test_1.c: In function 'main':
common_test_1.c:56:14: error: comparison between two arrays [-Werror=array-compare]
56 | assert (c5 > c4);
| ^
common_test_1.c:56:14: note: use '&c5[0] > &c4[0]' to compare the addresses
* testsuite/common_test_1.c: Avoid -Waddress warnings.
* testsuite/common_test_1_v1.c: Likewise.
* testsuite/common_test_1_v2.c: Likewise.
* testsuite/script_test_2.cc: Likewise.
Diffstat (limited to 'gold/testsuite/script_test_2.cc')
-rw-r--r-- | gold/testsuite/script_test_2.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gold/testsuite/script_test_2.cc b/gold/testsuite/script_test_2.cc index 9025e63f..48b79d2 100644 --- a/gold/testsuite/script_test_2.cc +++ b/gold/testsuite/script_test_2.cc @@ -61,12 +61,12 @@ main(int, char**) assert(end_data == start_data + 15); // Check that FILL works as expected. - assert(start_fill == end_data); + assert(&start_fill[0] == &end_data[0]); assert(memcmp(start_fill, "\x12\x34\x56\x78\x12\x34\x56\0", 8) == 0); assert(end_fill == start_fill + 8); - assert(end_test_area == end_fill); + assert(&end_test_area[0] == &end_fill[0]); - assert(test_addr == start_test_area_1); - assert(test_addr_alias == test_addr); + assert(&test_addr[0] == &start_test_area_1[0]); + assert(&test_addr_alias[0] == &test_addr[0]); } |