• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

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:

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.

変更サマリ

差分

--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -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+
17 2020-06-15 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
28
39 * gdb.base/jit-elf-so.exp: Refer to the global main_loader_basename
--- 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)
6262 m->keys = NULL;
6363 m->values = NULL;
6464 m->show_header = 0;
65+ return m;
6566 }
6667
6768 void
@@ -85,6 +86,7 @@ create_map_map (void)
8586 mm->length = 0;
8687 mm->values = NULL;
8788 mm->show_header = 0;
89+ return mm;
8890 }
8991
9092 void