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

Bug#297825: twin: FTBFS (amd64/gcc-4.0): invalid storage class for function 'DeleteAllListeners'



retitle 297825 twin: FTBFS (amd64/gcc-4.0): invalid storage class for function 'DeleteAllListeners'
thanks

Hello Christoph,

thank you for your fast reply to my bug report!

On 05-Mar-03 11:40, Christoph Berg wrote:
> Re: Andreas Jochens in <[🔎] E1D6lfA-0003TZ-BV@localhost.localdomain>
> > libTw_u.c: At top level:
> > libTw_u.c:1595: warning: conflicting types for 'DeleteAllListeners'
> > libTw_u.c:1595: error: static declaration of 'DeleteAllListeners' follows non-static declaration
> > libTw_u.c:1224: error: previous implicit declaration of 'DeleteAllListeners' was here

> I haven't looked at the source, but this fix seems like a workaround
> for me. Either there is already a global definition of
> DeleteAllListeners, in which case it should be fixed, or not, in which
> case moving a local static to global doesn't feel right. (Same for the
> other file.)

It is a violation of the C standard to declare a 'static' function 
inside another function and gcc-4.0 enforces this with the following
error message:

libTw_u.c: In function 'Tw_Close':
libTw_u.c:1196: error: invalid storage class for function 'DeleteAllListeners'
libTw_u.c:1224: warning: implicit declaration of function 'DeleteAllListeners'

I should have copied that part of the build log into my bug report.
I apologise for having ommited this.

Regards
Andreas Jochens



Reply to: