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/basic_string_view/cons | |
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/basic_string_view/cons')
-rw-r--r-- | gdb/unittests/basic_string_view/cons/char/1.cc | 8 | ||||
-rw-r--r-- | gdb/unittests/basic_string_view/cons/char/2.cc | 8 | ||||
-rw-r--r-- | gdb/unittests/basic_string_view/cons/char/3.cc | 8 |
3 files changed, 12 insertions, 12 deletions
diff --git a/gdb/unittests/basic_string_view/cons/char/1.cc b/gdb/unittests/basic_string_view/cons/char/1.cc index a7cc8f2..b5209bd 100644 --- a/gdb/unittests/basic_string_view/cons/char/1.cc +++ b/gdb/unittests/basic_string_view/cons/char/1.cc @@ -21,8 +21,8 @@ namespace cons_1 { -void -test01() +static void +test01 () { typedef gdb::string_view::size_type csize_type; @@ -56,8 +56,8 @@ test01() VERIFY( str07.length() == 10 ); } -int -main() +static int +main () { test01(); diff --git a/gdb/unittests/basic_string_view/cons/char/2.cc b/gdb/unittests/basic_string_view/cons/char/2.cc index 74af38b..bd7fb6f 100644 --- a/gdb/unittests/basic_string_view/cons/char/2.cc +++ b/gdb/unittests/basic_string_view/cons/char/2.cc @@ -21,8 +21,8 @@ namespace cons_2 { -void -test03() +static void +test03 () { const char* with_nulls = "This contains \0 a zero byte."; @@ -35,8 +35,8 @@ test03() VERIFY( s2.size() == 28 ); } -int -main() +static int +main () { test03(); diff --git a/gdb/unittests/basic_string_view/cons/char/3.cc b/gdb/unittests/basic_string_view/cons/char/3.cc index 9e1ca7e..8dbaba7 100644 --- a/gdb/unittests/basic_string_view/cons/char/3.cc +++ b/gdb/unittests/basic_string_view/cons/char/3.cc @@ -21,15 +21,15 @@ namespace cons_3 { -void -test05() +static void +test05 () { char const * s = 0; gdb::string_view zero_length_built_with_NULL(s, 0); } -int -main() +static int +main () { test05(); |