From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: "Insight (GDB GUI)" Subject: For review: Volatile and -Wreturn-type in gdbtk-hooks.c Date: Sun, 29 Aug 1999 22:41:00 -0000 Message-id: <37CA195C.A9B9C852@cygnus.com> X-SW-Source: 1999-q3/msg00112.html 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 * 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 ! 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 ! 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;