RE: Compiler warnings

New Message Reply Date view Thread view Subject view Author view

From: PEPPER Craig (craig.pepper++at++tenix.com)
Date: 05/01/2000 20:13:06


My advice is just live with it - at least when compiling the example code.
 
To get rid of the warning you can go into the code and do some ugly hacking,
eg:
 
pfStringMat(GSetStrings[EXTRUDED], *((const pfMatrix *)&mat));
 
Don't ask me why you can't just cast to (const pfMatrix) - some weirdness
with the compiler. There's probably a more elegant way to do it. In any
case, this generates exactly the same code as the original. What you need
to ask yourself is whether a compile with no warnings is more important than
being able to read the code.
 
If it's just the warning that bugs you though, you can add 1164 to the -woff
list. Or use C++, which handles this stuff much more cleanly.
 
Have fun,
Craig Pepper
Engineering - Simulation Systems
Systems Division, Tenix Defence Systems, Australia

 

-----Original Message-----
From: Guy Wallis [mailto:gwallis++at++hms.uq.edu.au]
Sent: Tuesday, 2 May 2000 11:35
To: info-performer++at++sgi.com
Subject: Compiler warnings

Hallo,
I've just started using Performer and decided to compile the examples in
/usr/share/Performer/src/pguide/libpf/C
They compiled OK but I got a lot of compiler warnings of the following type:

  

 /usr/bin/cc -DN32 -DIRIX6_5 -I/usr/include -fullwarn -nostdinc
-I/usr/include -mips3 -n32 -O --MDupdate Makedepend -woff
1685,515,608,658,799,803,852,1048,1233,1499 -c ../text3D.c
cc-1164 cc: WARNING File = ../text3D.c, Line = 96
  Argument of type "float (*)[4]" is incompatible with parameter of type
          "const float (*)[4]".

        pfStringMat(GSetStrings[EXTRUDED], mat);
                                           ^^^

This is true for many other function calls with pfMatrix as an argument
e.g.:

pfPostTransMat(), pfLoadMatrix(), pfMultMatrix().

I guess removing -fullwarn would hide this problem, but like the writers of
the original Makefile in the pguide directory, I like to use this feature.
Is there some way of eradicating this warning rather than ignoring it.

Many thanks,

Guy
  -----------------------------------------------------------------------
List Archives, FAQ, FTP: http://www.sgi.com/software/performer/ Submissions:
info-performer++at++sgi.com Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Mon May 01 2000 - 20:20:45 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.