[jdev] Re: beta 1 release of jabberd 1.4.4
m at tthias.net
Wed Mar 9 06:17:05 CST 2005
Alex Mauer schrieb am 2005-03-08 11:49:31:
> I had some trouble compiling this on Redhat 7.3 w/ gcc 2.96. (yes, I know
> it sucks) Error was as follows:
> gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../jabberd -I../jabberd/lib -g -O2 -c
> xdb_sql.c -fPIC -DPIC -o .libs/xdb_sql.o
> xdb_sql.c: In function `xdb_sql_phandler':
> xdb_sql.c:513: parse error before `char'
> xdb_sql.c:514: `query' undeclared (first use in this function)
> xdb_sql.c:514: (Each undeclared identifier is reported only once
> xdb_sql.c:514: for each function it appears in.) xdb_sql.c:542: parse
> error before `char'
> xdb_sql.c:569: parse error before `char'
> Declaring the char *query at the top fixed the compile error, but I don't
> know if this is the "right way" to do it.
Thanks for reporting this bug. You fixed it the right way. Most ANSI C
compilers don't support declading variables after the first non variable
declaration statement in a block.
Not sure if ANSI C 99 relaxed this and does allow what I had written,
but for sure it's better to declare the variable at the begin of the
Fon: +49-(0)70 0770 07770 http://web.amessage.info
Fax: +49-(0)89 312 88 654 xmpp:mawis at amessage.info
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the JDev