This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

fork-child.c:97: warning: argument `exec_file' might be clobbered by `longjmp' or `vfork'


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]