aboutsummaryrefslogtreecommitdiff
path: root/gdb/observer.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2003-12-12 16:14:26 +0000
committerMark Kettenis <kettenis@gnu.org>2003-12-12 16:14:26 +0000
commitf82de61cdc85fcad122cc74fb761094ab7b480c8 (patch)
treea084a3f4fdc6dcc5d45e7e242e0669ef72b49c75 /gdb/observer.c
parentac7bbf74d3daf2b77d0ac2dc073ce5cb1fd44517 (diff)
downloadfsf-binutils-gdb-f82de61cdc85fcad122cc74fb761094ab7b480c8.zip
fsf-binutils-gdb-f82de61cdc85fcad122cc74fb761094ab7b480c8.tar.gz
fsf-binutils-gdb-f82de61cdc85fcad122cc74fb761094ab7b480c8.tar.bz2
* observer.c (observer_test_first_observer)
(observer_test_second_observer, observer_test_third_observer): Don't define as `static'. (observer_test_first_notification_function) (observer_test_second_notification_function) (observer_test_third_notification_function): Likewise.
Diffstat (limited to 'gdb/observer.c')
-rw-r--r--gdb/observer.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/gdb/observer.c b/gdb/observer.c
index 6815d0f..fce5f92 100644
--- a/gdb/observer.c
+++ b/gdb/observer.c
@@ -191,30 +191,30 @@ observer_notify_normal_stop (void)
generic_observer_notify (normal_stop_subject, NULL);
}
-/* The following code is only used to unit-test the observers from
- our testsuite. DO NOT USE IT within observer.c! */
+/* The following code is only used to unit-test the observers from our
+ testsuite. DO NOT USE IT within observer.c (or anywhere else for
+ that matter)! */
-/* Since this code will not be used within GDB, it will trigger
- a warning if we decide to compile with -Wunused-function.
- This is ok for now. (brobecker 2003-03-18) */
+/* If we define these variables and functions as `static', the
+ compiler will optimize them out. */
-static int observer_test_first_observer = 0;
-static int observer_test_second_observer = 0;
-static int observer_test_third_observer = 0;
+int observer_test_first_observer = 0;
+int observer_test_second_observer = 0;
+int observer_test_third_observer = 0;
-static void
+void
observer_test_first_notification_function (void)
{
observer_test_first_observer++;
}
-static void
+void
observer_test_second_notification_function (void)
{
observer_test_second_observer++;
}
-static void
+void
observer_test_third_notification_function (void)
{
observer_test_third_observer++;