aboutsummaryrefslogtreecommitdiff
path: root/gdb/unittests
diff options
context:
space:
mode:
authorDave Murphy <davem@devkitpro.org>2018-12-21 11:14:28 -0500
committerSimon Marchi <simon.marchi@ericsson.com>2018-12-21 11:45:16 -0500
commit3dcfdc58656caa4a38e1fde73a07a19114347226 (patch)
tree04a426167f9d140813377156a1272f9ddbbf9844 /gdb/unittests
parente8f2b38a26591c44471e04b09b7b77990845d520 (diff)
downloadgdb-3dcfdc58656caa4a38e1fde73a07a19114347226.zip
gdb-3dcfdc58656caa4a38e1fde73a07a19114347226.tar.gz
gdb-3dcfdc58656caa4a38e1fde73a07a19114347226.tar.bz2
Fix compile error with clang 3.8
When compiling with clang 3.8 (default clang version on Debian Stretch, the current stable), we get errors like this: CXX dtrace-probe.o ../../binutils-gdb/gdb/dtrace-probe.c:103:31: error: default initialization of an object of const type 'const dtrace_static_probe_ops' without a user-provided default constructor const dtrace_static_probe_ops dtrace_static_probe_ops; ^ Silence them by value-initializing those objects. It's not necessary with other compilers (later clang versions, gcc), but it shouldn't hurt either.
Diffstat (limited to 'gdb/unittests')
-rw-r--r--gdb/unittests/observable-selftests.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/unittests/observable-selftests.c b/gdb/unittests/observable-selftests.c
index 6f2f7e8..903baa7 100644
--- a/gdb/unittests/observable-selftests.c
+++ b/gdb/unittests/observable-selftests.c
@@ -70,7 +70,7 @@ run_tests ()
attached. */
notify_check_counters (0, 0, 0);
- const gdb::observers::token token1, token2, token3;
+ const gdb::observers::token token1 {}, token2 {} , token3 {};
/* Now, attach one observer, and send a notification. */
test_notification.attach (&test_second_notification_function, token2);