mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-29 16:38:05 +08:00
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: 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.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user