From: Mark Kettenis <kettenis@chello.nl>
To: eliz@elta.co.il
Cc: gdb-patches@sources.redhat.com, brobecker@gnat.com
Subject: Re: [PATCH/RFC] observer tests & GCC 3.4
Date: Fri, 12 Dec 2003 16:24:00 -0000 [thread overview]
Message-ID: <200312121624.hBCGOZFa017519@elgar.kettenis.dyndns.org> (raw)
In-Reply-To: <ur7zbqv7j.fsf@elta.co.il> (message from Eli Zaretskii on 11 Dec 2003 16:34:40 +0200)
Date: 11 Dec 2003 16:34:40 +0200
From: Eli Zaretskii <eliz@elta.co.il>
> Date: Thu, 11 Dec 2003 14:55:15 +0100 (CET)
> From: Mark Kettenis <kettenis@chello.nl>
>
> Index: ChangeLog
> from 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.
Nitpicking: the format of the ChangeLog entries is not according to
standards.texi. (See my other message today, in another thread.)
Oh dear. I've been doing this the wrong way for *years*. I'll try to
be a good boy from now on ;-).
Anyway, I committed the attached.
Mark
Index: ChangeLog
from 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.
Index: observer.c
===================================================================
RCS file: /cvs/src/src/gdb/observer.c,v
retrieving revision 1.3
diff -u -p -r1.3 observer.c
--- observer.c 18 Mar 2003 18:05:50 -0000 1.3
+++ observer.c 12 Dec 2003 16:09:32 -0000
@@ -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++;
prev parent reply other threads:[~2003-12-12 16:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-11 13:55 Mark Kettenis
2003-12-11 14:14 ` Joel Brobecker
2003-12-11 14:24 ` Daniel Jacobowitz
2003-12-11 14:34 ` Eli Zaretskii
2003-12-12 16:24 ` Mark Kettenis [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200312121624.hBCGOZFa017519@elgar.kettenis.dyndns.org \
--to=kettenis@chello.nl \
--cc=brobecker@gnat.com \
--cc=eliz@elta.co.il \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox