diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2019-11-26 12:12:03 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2019-11-26 14:29:20 -0500 |
commit | dd694d7740f4eacd8b7bcf4183ca31810e69e9d5 (patch) | |
tree | 713ab4f66dda61f4f336bdd1dac49ca7f39f53f4 /gdb/unittests/optional | |
parent | 3b5c1d49e09cd44ef772801f3365d0cbdc4673ee (diff) | |
download | gdb-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')
-rw-r--r-- | gdb/unittests/optional/assignment/1.cc | 3 | ||||
-rw-r--r-- | gdb/unittests/optional/assignment/2.cc | 3 | ||||
-rw-r--r-- | gdb/unittests/optional/assignment/3.cc | 3 | ||||
-rw-r--r-- | gdb/unittests/optional/assignment/4.cc | 3 | ||||
-rw-r--r-- | gdb/unittests/optional/assignment/5.cc | 3 | ||||
-rw-r--r-- | gdb/unittests/optional/assignment/6.cc | 3 | ||||
-rw-r--r-- | gdb/unittests/optional/assignment/7.cc | 3 | ||||
-rw-r--r-- | gdb/unittests/optional/cons/copy.cc | 3 | ||||
-rw-r--r-- | gdb/unittests/optional/cons/default.cc | 3 | ||||
-rw-r--r-- | gdb/unittests/optional/cons/move.cc | 3 | ||||
-rw-r--r-- | gdb/unittests/optional/cons/value.cc | 3 | ||||
-rw-r--r-- | gdb/unittests/optional/in_place.cc | 3 | ||||
-rw-r--r-- | gdb/unittests/optional/observers/1.cc | 3 | ||||
-rw-r--r-- | gdb/unittests/optional/observers/2.cc | 3 |
14 files changed, 28 insertions, 14 deletions
diff --git a/gdb/unittests/optional/assignment/1.cc b/gdb/unittests/optional/assignment/1.cc index 8524647..f17468c 100644 --- a/gdb/unittests/optional/assignment/1.cc +++ b/gdb/unittests/optional/assignment/1.cc @@ -92,7 +92,8 @@ struct value_type : private mixin_counter state_type state = zero; }; -void test() +static void +test () { using O = gdb::optional<value_type>; using S = value_type::state_type; diff --git a/gdb/unittests/optional/assignment/2.cc b/gdb/unittests/optional/assignment/2.cc index 8c91602..9964d57 100644 --- a/gdb/unittests/optional/assignment/2.cc +++ b/gdb/unittests/optional/assignment/2.cc @@ -92,7 +92,8 @@ struct value_type : private mixin_counter state_type state = zero; }; -void test() +static void +test () { using O = gdb::optional<value_type>; using S = value_type::state_type; diff --git a/gdb/unittests/optional/assignment/3.cc b/gdb/unittests/optional/assignment/3.cc index 2957a29..2fbab47 100644 --- a/gdb/unittests/optional/assignment/3.cc +++ b/gdb/unittests/optional/assignment/3.cc @@ -92,7 +92,8 @@ struct value_type : private mixin_counter state_type state = zero; }; -void test() +static void +test () { using O = gdb::optional<value_type>; using S = value_type::state_type; diff --git a/gdb/unittests/optional/assignment/4.cc b/gdb/unittests/optional/assignment/4.cc index 98ea03d..d86bc03 100644 --- a/gdb/unittests/optional/assignment/4.cc +++ b/gdb/unittests/optional/assignment/4.cc @@ -92,7 +92,8 @@ struct value_type : private mixin_counter state_type state = zero; }; -void test() +static void +test () { using O = gdb::optional<value_type>; using S = value_type::state_type; diff --git a/gdb/unittests/optional/assignment/5.cc b/gdb/unittests/optional/assignment/5.cc index 3a7bd33..b7b8d61 100644 --- a/gdb/unittests/optional/assignment/5.cc +++ b/gdb/unittests/optional/assignment/5.cc @@ -28,7 +28,8 @@ struct mixin_counter struct value_type : private mixin_counter { }; -void test() +static void +test () { using O = gdb::optional<value_type>; diff --git a/gdb/unittests/optional/assignment/6.cc b/gdb/unittests/optional/assignment/6.cc index cea5994..3c1e246 100644 --- a/gdb/unittests/optional/assignment/6.cc +++ b/gdb/unittests/optional/assignment/6.cc @@ -34,7 +34,8 @@ struct value_type : private mixin_counter int state = 0; }; -void test() +static void +test () { using O = gdb::optional<value_type>; diff --git a/gdb/unittests/optional/assignment/7.cc b/gdb/unittests/optional/assignment/7.cc index 76a47eb..5e73670 100644 --- a/gdb/unittests/optional/assignment/7.cc +++ b/gdb/unittests/optional/assignment/7.cc @@ -17,7 +17,8 @@ namespace assign_7 { -void test() +static void +test () { gdb::optional<int> o{666}; VERIFY(o && *o == 666); diff --git a/gdb/unittests/optional/cons/copy.cc b/gdb/unittests/optional/cons/copy.cc index 28bfce8..af8b56e 100644 --- a/gdb/unittests/optional/cons/copy.cc +++ b/gdb/unittests/optional/cons/copy.cc @@ -47,7 +47,8 @@ struct throwing_copy throwing_copy(throwing_copy const&) { throw exception {}; } }; -void test() +static void +test () { // [20.5.4.1] Constructors diff --git a/gdb/unittests/optional/cons/default.cc b/gdb/unittests/optional/cons/default.cc index 828fa26..54c4bf7 100644 --- a/gdb/unittests/optional/cons/default.cc +++ b/gdb/unittests/optional/cons/default.cc @@ -33,7 +33,8 @@ struct tracker int tracker::count = 0; -void test() +static void +test () { // [20.5.4.1] Constructors diff --git a/gdb/unittests/optional/cons/move.cc b/gdb/unittests/optional/cons/move.cc index 0cfa539..cf363f4 100644 --- a/gdb/unittests/optional/cons/move.cc +++ b/gdb/unittests/optional/cons/move.cc @@ -47,7 +47,8 @@ struct throwing_move throwing_move(throwing_move const&) { throw exception {}; } }; -void test() +static void +test () { // [20.5.4.1] Constructors diff --git a/gdb/unittests/optional/cons/value.cc b/gdb/unittests/optional/cons/value.cc index e47b367..23f546e 100644 --- a/gdb/unittests/optional/cons/value.cc +++ b/gdb/unittests/optional/cons/value.cc @@ -55,7 +55,8 @@ struct throwing_construction bool propagate; }; -void test() +static void +test () { // [20.5.4.1] Constructors diff --git a/gdb/unittests/optional/in_place.cc b/gdb/unittests/optional/in_place.cc index 6387be4..d751abe 100644 --- a/gdb/unittests/optional/in_place.cc +++ b/gdb/unittests/optional/in_place.cc @@ -17,7 +17,8 @@ namespace in_place { -void test() +static void +test () { // [20.5.5] In-place construction { 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 ); |