diff options
author | Gary Benson <gbenson@redhat.com> | 2020-06-16 12:41:28 +0100 |
---|---|---|
committer | Gary Benson <gbenson@redhat.com> | 2020-06-16 12:41:28 +0100 |
commit | c802e8a76c4eaa3a8a62d7dcfe7be98bf718a2f0 (patch) | |
tree | 4fb863b4ef297d2fc09b92f1177a25a601557ce5 /gdb | |
parent | 90cd2aad0314291328f21cb68ee76efc6c4f8a30 (diff) | |
download | gdb-c802e8a76c4eaa3a8a62d7dcfe7be98bf718a2f0.zip gdb-c802e8a76c4eaa3a8a62d7dcfe7be98bf718a2f0.tar.gz gdb-c802e8a76c4eaa3a8a62d7dcfe7be98bf718a2f0.tar.bz2 |
Add two missing return values in gdb.python/py-nested-maps.cusers/luisgpm/test
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:
warning: control reaches end of non-void function [-Wreturn-type]
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.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.python/py-nested-maps.c | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 6fe1877..d2ed9db 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2020-06-16 Gary Benson <gbenson@redhat.com> + + * gdb.python/py-nested-maps.c (create_map): Add missing return + value. + (create_map_map): Likewise. + 2020-06-15 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> * gdb.base/jit-elf-so.exp: Refer to the global main_loader_basename diff --git a/gdb/testsuite/gdb.python/py-nested-maps.c b/gdb/testsuite/gdb.python/py-nested-maps.c index 665efa1..860b473 100644 --- a/gdb/testsuite/gdb.python/py-nested-maps.c +++ b/gdb/testsuite/gdb.python/py-nested-maps.c @@ -62,6 +62,7 @@ create_map (const char *name) m->keys = NULL; m->values = NULL; m->show_header = 0; + return m; } void @@ -85,6 +86,7 @@ create_map_map (void) mm->length = 0; mm->values = NULL; mm->show_header = 0; + return mm; } void |