Steve Baker (sbaker++at++link.com)
Mon, 12 Oct 1998 12:17:05 -0500 (CDT)
> > I'm tired of these compiler warnings
> >
> > "float (*)[4]" is incompatible with parameter of type "const float (*)[4]"
> >
> > I want to do things like
> >
> > pfMatrix m1,m2,m3;
> > pfPostMultMat(m2,m3);
> > pfPostMultMat(m1,m2);
> >
> > (e.g., reuse constant input matrices as output matrices)
> >
> > Any tips? (Besides disabling this warning or switching to C++ :)
> >
> > Thanks,
> > Steve
> > --
> > stephen.maher++at++gsfc.nasa.gov (301) 286-3368 fax:(301) 286-1776
>
> Use the #pragma to set and reset warning numbers around some parts of
> the code
>
> #pragma set woff 1122
>
> <code that generates warning 1122>
>
> #pragma reset woff 1122
Ack! The problem is that those warning numbers change from one SGI C/C++ compiler
to the next. This code might turn off the 'const' message now - but next time
it might turn off the 'unused variable' warning or something else that you should
really care about.
Can't you use a 'cast' to fix it? (I don't use C so I don't know for sure):
pfPostMultMat(m2,(const float (*)[4]) m3);
???
Steve Baker (817)619-2657 (Vox/Vox-Mail)
Raytheon Systems Inc. (817)619-2466 (Fax)
Work: SBaker++at++link.com http://www.hti.com
Home: SJBaker1++at++airmail.net http://web2.airmail.net/sjbaker1
This archive was generated by hypermail 2.0b2 on Mon Oct 12 1998 - 10:17:30 PDT