]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* observer.c (observer_test_first_observer)
authorMark Kettenis <kettenis@gnu.org>
Fri, 12 Dec 2003 16:14:26 +0000 (16:14 +0000)
committerMark Kettenis <kettenis@gnu.org>
Fri, 12 Dec 2003 16:14:26 +0000 (16:14 +0000)
(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.

gdb/ChangeLog
gdb/observer.c

index 5a940eec5189e36787ba5af34e0dfc1dbd5e6b4c..cf4fd34559bc04ed3cd612e15202e914ed03bdeb 100644 (file)
@@ -1,3 +1,12 @@
+2003-12-11  Mark Kettenis  <kettenis@gnu.org>
+
+       * 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.
+
 2003-12-10  Mark Kettenis  <kettenis@gnu.org>
 
        * solib.h (SOLIB_UNLOADED_LIBRARY_PATHNAME): Define as "" instead
index 6815d0f9c833093464919ae3dbc7ca31cfbea96e..fce5f9287d83144df05ce6125b8d6a1bdcf53df3 100644 (file)
@@ -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++;