[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: might be clobbered



On Tue, Jan 29, 2002 at 12:10:33PM +0300, Alexey wrote:
> the gcc output:
> 
> ******************< begin quotation >********************
> 
> cc1: warnings being treated as errors
> ./common/linksupport.c: In function `getconnection':
> ./common/linksupport.c:222: warning: variable `sock' might be clobbered by `longjmp' or `vfork'

You're using setjmp(), so the compiler will generate warnings for pretty
much every variable in the same stack frame. You could either
restructure the code not to use setjmp() or else move all those variable
declarations to a separate function where they'll be safer.

If this isn't your code and you don't mind ignoring the warnings, then
stop using the -Werror flag to gcc.

Cheers,

-- 
Colin Watson                                  [cjwatson@flatline.org.uk]



Reply to: