This is the mail archive of the
insight@sourceware.cygnus.com
mailing list for the Insight project.
For review: Volatile and -Wreturn-type in gdbtk-hooks.c
- To: "Insight (GDB GUI)" <insight@sourceware.cygnus.com>
- Subject: For review: Volatile and -Wreturn-type in gdbtk-hooks.c
- From: Andrew Cagney <ac131313@cygnus.com>
- Date: Mon, 30 Aug 1999 15:40:44 +1000
- Organization: Cygnus Solutions
Hello,
The attached patch:
o makes several flags volatile
o fixes a missing return result
Andrew
Mon Aug 30 15:34:42 1999 Andrew Cagney <cagney@b1.cygnus.com>
* gdbtk-hooks.c (x_event): Missing result to return - return 0.
Make in_x_event volatile.
(in_fputs): Make volatile.
Index: gdbtk-hooks.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/gdbtk-hooks.c,v
retrieving revision 2.27
diff -p -r2.27 gdbtk-hooks.c
*** gdbtk-hooks.c 1999/08/07 01:27:45 2.27
--- gdbtk-hooks.c 1999/08/30 05:38:01
***************
*** 60,66 ****
#include "annotate.h"
#include <sys/time.h>
! int in_fputs = 0;
/* Set by gdb_stop, this flag informs x_event to tell its caller
that it should forcibly detach from the target. */
--- 60,66 ----
#include "annotate.h"
#include <sys/time.h>
! volatile int in_fputs = 0;
/* Set by gdb_stop, this flag informs x_event to tell its caller
that it should forcibly detach from the target. */
*************** int
*** 412,422 ****
x_event (signo)
int signo;
{
! static int in_x_event = 0;
static Tcl_Obj *varname = NULL;
static int count = 0;
if (in_x_event || in_fputs)
! return;
in_x_event = 1;
gdbtk_force_detach = 0;
--- 412,422 ----
x_event (signo)
int signo;
{
! static volatile int in_x_event = 0;
static Tcl_Obj *varname = NULL;
static int count = 0;
if (in_x_event || in_fputs)
! return 0;
in_x_event = 1;
gdbtk_force_detach = 0;