This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
fork-child.c:97: warning: argument `exec_file' might be clobbered by `longjmp' or `vfork'
- To: GDB Discussion <gdb at sourceware dot cygnus dot com>
- Subject: fork-child.c:97: warning: argument `exec_file' might be clobbered by `longjmp' or `vfork'
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Mon, 13 Nov 2000 16:59:51 +1100
Compiling GDB with:
-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses
-Wpointer-arith -Wuninitialized -Werror
gets the warnings:
../../src/gdb/fork-child.c: In function `fork_inferior':
../../src/gdb/fork-child.c:112: warning: `argv' might be used
uninitialized in this function
../../src/gdb/fork-child.c:112: warning: variable `argv' might be
clobbered by `longjmp' or `vfork'
../../src/gdb/fork-child.c:97: warning: argument `exec_file' might be
clobbered by `longjmp' or `vfork'
../../src/gdb/fork-child.c:99: warning: argument `shell_file' might be
clobbered by `longjmp' or `vfork'
I can understand the argv warning but not the warnings about
``exec_file'' and ``shell_file''. Anyone care to explain what they are
about? I've looked at the the fork_inferior() source, and beyond the
vfork() call, I could only find rval (read-only) references to the
``exec_file'' and ``shell_file'' arguments.
Andrew