XForms: [holeczek@heracles.cto.us.edu.pl: lyx-0.12.1pre6 compile problems on AIX]

Jean-Marc Lasgouttes (Jean-Marc.Lasgouttes@inria.fr)
Fri, 26 Jun 1998 16:32:49 +0200 (MET DST)

# To subscribers of the xforms list from Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr> :

--Multipart_Fri_Jun_26_16:32:47_1998-1
Content-Type: text/plain; charset=US-ASCII

Hello,

We got a report about warnings while compiling LyX on AIX with the
xlC. Since it looks like a simple enough change to do in fdesign, I
transmit it to you directly. I agree that this is stupid from xlC, but
avoiding warnings is always good.

JMarc

--Multipart_Fri_Jun_26_16:32:47_1998-1
Content-Type: message/rfc822

Date: Fri, 26 Jun 1998 13:39:05 +0100 (NFT)
From: "Jacek M. Holeczek" <holeczek@heracles.cto.us.edu.pl>
To: lyx@via.ecp.fr
Subject: lyx-0.12.1pre6 compile problems on AIX

Hi,
I just tried to compile the lyx-0.12.1pre6 on an IBM RS/6000 machine
running AIX 4.1 using standard AIX C++ compiler ( xlC ).

[... parts ommitted... ]

In files :
src/lyx.C
src/form1.C
src/credits_form.C
src/layout_forms.C
src/print_form.C
src/latexoptions.C
src/sp_form.C
src/math_forms.C
src/lyx_sendfax.C
src/insetbib.C
src/insetindex.C
src/insetinclude.C
src/bullet_forms.C

I get warnings :
... "fdui" may be used before being set.

It always happens to lines in form ( examples taken from src/lyx.C ) :
FD_form_title *fdui = (FD_form_title *) fl_calloc(1, sizeof(*fdui));
FD_form_figure *fdui = (FD_form_figure *) fl_calloc(1, sizeof(*fdui));
FD_form_screen *fdui = (FD_form_screen *) fl_calloc(1, sizeof(*fdui));
FD_form_toc *fdui = (FD_form_toc *) fl_calloc(1, sizeof(*fdui));
FD_form_ref *fdui = (FD_form_ref *) fl_calloc(1, sizeof(*fdui));

I would propose to change them into :
FD_form_title *fdui = (FD_form_title *) fl_calloc(1, sizeof(FD_form_title));
FD_form_figure *fdui = (FD_form_figure *) fl_calloc(1, sizeof(FD_form_figure));
FD_form_screen *fdui = (FD_form_screen *) fl_calloc(1, sizeof(FD_form_screen));
FD_form_toc *fdui = (FD_form_toc *) fl_calloc(1, sizeof(FD_form_toc));
FD_form_ref *fdui = (FD_form_ref *) fl_calloc(1, sizeof(FD_forfm_re));
Best regards,
Jacek.

--Multipart_Fri_Jun_26_16:32:47_1998-1--
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/