aboutsummaryrefslogtreecommitdiff
path: root/gdb/unittests/optional/observers
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2019-11-26 12:12:03 -0500
committerSimon Marchi <simon.marchi@efficios.com>2019-11-26 14:29:20 -0500
commitdd694d7740f4eacd8b7bcf4183ca31810e69e9d5 (patch)
tree713ab4f66dda61f4f336bdd1dac49ca7f39f53f4 /gdb/unittests/optional/observers
parent3b5c1d49e09cd44ef772801f3365d0cbdc4673ee (diff)
downloadgdb-dd694d7740f4eacd8b7bcf4183ca31810e69e9d5.zip
gdb-dd694d7740f4eacd8b7bcf4183ca31810e69e9d5.tar.gz
gdb-dd694d7740f4eacd8b7bcf4183ca31810e69e9d5.tar.bz2
Make functions static in unittests
Enabling -Wmissing-declarations points out that a bunch of function in the unittests can be made static, do that. gdb/ChangeLog: * unittests/array-view-selftests.c (check_ptr_size_ctor2): Make static. * unittests/basic_string_view/capacity/1.cc (test01): Likewise. * unittests/basic_string_view/cons/char/1.cc (test01): Likewise. (main): Likewise. * unittests/basic_string_view/cons/char/2.cc (test03): Likewise. (main): Likewise. * unittests/basic_string_view/cons/char/3.cc (test05): Likewise. (main): Likewise. * unittests/basic_string_view/element_access/char/1.cc (test01): Likewise. (main): Likewise. * unittests/basic_string_view/element_access/char/empty.cc (main): Likewise. * unittests/basic_string_view/element_access/char/front_back.cc (test01): Likewise. (main): Likewise. * unittests/basic_string_view/inserters/char/2.cc (test05): Likewise. (main): Likewise. * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc (test01): Likewise. (main): Likewise. * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc (test01): Likewise. (main): Likewise. * unittests/basic_string_view/modifiers/swap/char/1.cc (test01): Likewise. * unittests/basic_string_view/operations/compare/char/1.cc (test01): Likewise. (main): Likewise. * unittests/basic_string_view/operations/compare/char/13650.cc (test01): Likewise. * unittests/basic_string_view/operations/copy/char/1.cc (test01): Likewise. (main): Likewise. * unittests/basic_string_view/operations/data/char/1.cc (test01): Likewise. (main): Likewise. * unittests/basic_string_view/operations/find/char/1.cc (test01): Likewise. (main): Likewise. * unittests/basic_string_view/operations/find/char/2.cc (test02): Likewise. (main): Likewise. * unittests/basic_string_view/operations/find/char/3.cc (test03): Likewise. (main): Likewise. * unittests/basic_string_view/operations/find/char/4.cc (main): Likewise. * unittests/basic_string_view/operations/rfind/char/1.cc (test01): Likewise. (main): Likewise. * unittests/basic_string_view/operations/rfind/char/2.cc (test02): Likewise. (main): Likewise. * unittests/basic_string_view/operations/rfind/char/3.cc (test03): Likewise. (main): Likewise. * unittests/basic_string_view/operations/substr/char/1.cc (test01): Likewise. (main): Likewise. * unittests/basic_string_view/operators/char/2.cc (main): Likewise. * unittests/optional/assignment/1.cc (test): Likewise. * unittests/optional/assignment/2.cc (test): Likewise. * unittests/optional/assignment/3.cc (test): Likewise. * unittests/optional/assignment/4.cc (test): Likewise. * unittests/optional/assignment/5.cc (test): Likewise. * unittests/optional/assignment/6.cc (test): Likewise. * unittests/optional/assignment/7.cc (test): Likewise. * unittests/optional/cons/copy.cc (test): Likewise. * unittests/optional/cons/default.cc (test): Likewise. * unittests/optional/cons/move.cc (test): Likewise. * unittests/optional/cons/value.cc (test): Likewise. * unittests/optional/in_place.cc (test): Likewise. * unittests/optional/observers/1.cc (test): Likewise. * unittests/optional/observers/2.cc (test): Likewise. Change-Id: I66626db864cb877cacc570d4660df633530554f5
Diffstat (limited to 'gdb/unittests/optional/observers')
-rw-r--r--gdb/unittests/optional/observers/1.cc3
-rw-r--r--gdb/unittests/optional/observers/2.cc3
2 files changed, 4 insertions, 2 deletions
diff --git a/gdb/unittests/optional/observers/1.cc b/gdb/unittests/optional/observers/1.cc
index 42a7719..368c42d 100644
--- a/gdb/unittests/optional/observers/1.cc
+++ b/gdb/unittests/optional/observers/1.cc
@@ -22,7 +22,8 @@ struct value_type
int i;
};
-void test()
+static void
+test ()
{
gdb::optional<value_type> o { value_type { 51 } };
VERIFY( (*o).i == 51 );
diff --git a/gdb/unittests/optional/observers/2.cc b/gdb/unittests/optional/observers/2.cc
index cc28c0b..e259b2b 100644
--- a/gdb/unittests/optional/observers/2.cc
+++ b/gdb/unittests/optional/observers/2.cc
@@ -24,7 +24,8 @@ struct value_type
void* operator&(const value_type&) = delete;
-void test()
+static void
+test ()
{
gdb::optional<value_type> o { value_type { 51 } };
VERIFY( o->i == 51 );