GNU Binutils with patches for OS216
リビジョン | c802e8a76c4eaa3a8a62d7dcfe7be98bf718a2f0 (tree) |
---|---|
日時 | 2020-06-16 20:41:28 |
作者 | Gary Benson <gbenson@redh...> |
コミッター | Gary Benson |
Add two missing return values in gdb.python/py-nested-maps.c
Two functions in gdb.python/py-nested-maps.c are missing return
values. This causes clang to fail to compile the file with the
following error:
This commit fixes, by causing the two functions to return pointers
to the objects they've just allocated and initialized. I didn't
investigate how this test had been passing with other compilers;
I'm assuming serendipity, that in each function the value to be
returned was already in the register it would need to be in to be
the function's return value.
gdb/testsuite/ChangeLog:
* gdb.python/py-nested-maps.c (create_map): Add missing return
value.
(create_map_map): Likewise.
@@ -1,3 +1,9 @@ | ||
1 | +2020-06-16 Gary Benson <gbenson@redhat.com> | |
2 | + | |
3 | + * gdb.python/py-nested-maps.c (create_map): Add missing return | |
4 | + value. | |
5 | + (create_map_map): Likewise. | |
6 | + | |
1 | 7 | 2020-06-15 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> |
2 | 8 | |
3 | 9 | * gdb.base/jit-elf-so.exp: Refer to the global main_loader_basename |
@@ -62,6 +62,7 @@ create_map (const char *name) | ||
62 | 62 | m->keys = NULL; |
63 | 63 | m->values = NULL; |
64 | 64 | m->show_header = 0; |
65 | + return m; | |
65 | 66 | } |
66 | 67 | |
67 | 68 | void |
@@ -85,6 +86,7 @@ create_map_map (void) | ||
85 | 86 | mm->length = 0; |
86 | 87 | mm->values = NULL; |
87 | 88 | mm->show_header = 0; |
89 | + return mm; | |
88 | 90 | } |
89 | 91 | |
90 | 92 | void |