summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/gmon.c
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2012-08-14 19:38:43 +0000
committerCorinna Vinschen <corinna@vinschen.de>2012-08-14 19:38:43 +0000
commit25a520c260789b5d32f78bb7d550ae3ddf6b4e98 (patch)
tree783935f4c6e47c856667773579278d6e79b32e8d /winsup/cygwin/gmon.c
parent0587c5ef4fe0ad3e2b4a41462419a2f2bfc32b60 (diff)
downloadcygnal-25a520c260789b5d32f78bb7d550ae3ddf6b4e98.tar.gz
cygnal-25a520c260789b5d32f78bb7d550ae3ddf6b4e98.tar.bz2
cygnal-25a520c260789b5d32f78bb7d550ae3ddf6b4e98.zip
* gmon.c (_mcleanup): Fix scope bug when using gmon_out array.
Diffstat (limited to 'winsup/cygwin/gmon.c')
-rw-r--r--winsup/cygwin/gmon.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/winsup/cygwin/gmon.c b/winsup/cygwin/gmon.c
index 13342eb7d..56f9440dd 100644
--- a/winsup/cygwin/gmon.c
+++ b/winsup/cygwin/gmon.c
@@ -146,6 +146,9 @@ _mcleanup()
struct gmonparam *p = &_gmonparam;
struct gmonhdr gmonhdr, *hdr;
char *proffile;
+#ifndef nope
+ char gmon_out[] = "gmon.out";
+#endif
#ifdef DEBUG
int log, len;
char dbuf[200];
@@ -203,10 +206,7 @@ _mcleanup()
proffile = "gmon.out";
}
#else
- {
- char gmon_out[] = "gmon.out";
- proffile = gmon_out;
- }
+ proffile = gmon_out;
#endif
fd = open(proffile , O_CREAT|O_TRUNC|O_WRONLY|O_BINARY, 0666);