Maybe writing the field as an int instead of uint is the right solution? I'm open to suggestions. Gordon, can you check the spec for us on this? I'm on vacation and don't have ready access...

Paul Martz
Skew Matrix Software


On Jun 20, 2008, at 10:28 AM, "Gordon Tomlinson" <[EMAIL PROTECTED] > wrote:

Hi Paul

Might well be a bug in the spec as uint is could clearly wrong in many
cases, if you bring Creator up, you will see Creator uses a -1 in many
places to mean default/not set, Such as textures, alternative color,
materials etc...



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul
Martz
Sent: Friday, June 20, 2008 11:22 AM
To: OpenSceneGraph Submissions
Subject: Re: [osg-submissions] Warning about unsigned value in
OpenFlightplugin

If I recall correctly, the flt spec states this is an unsigned field, but
calls for -1 as a valid value. Clearly a bug in the spec.

Paul Martz
Skew Matrix Software


On Jun 20, 2008, at 9:19 AM, "Robert Osfield"
<[EMAIL PROTECTED]> wrote:

Hi Mario, Paul and Brede,

I've done a quick review and it the change looks reasonable, but...
I'm not familiar with the OpenFlight specs.

The change is from :

      _records->writeUInt32( -1 ); // Back color for bidirectional

To:

      _records->writeUInt32( UINT_MAX ); // Back color for
bidirectional

So Brede & Paul, what are you thoughts?  Clearly passing -1 to a
Unit32 is wrong, but what is the official spec for this?

Robert.

On Fri, Jun 20, 2008 at 2:18 PM, Mario Valle <[EMAIL PROTECTED]> wrote:
On x86_64 (Suse 10.3) the Open Flight plugin show the following
warning:

/users/mvalle/OSG/OpenSceneGraph/src/osgPlugins/OpenFlight/
expPrimaryRecords.cpp:
In member function `void flt::FltExportVisitor::writeLightPoint (const
osgSim::LightPointNode*)':
/users/mvalle/OSG/OpenSceneGraph/src/osgPlugins/OpenFlight/
expPrimaryRecords.cpp:710:
warning: passing negative value `-0x00000000000000001' for converting
1 of `void flt::DataOutputStream::writeUInt32(flt::uint32)'

The attached file solves the warning.
Ciao!
     mario

--
Ing. Mario Valle
Data Analysis and Visualization Services         |
http://www.cscs.ch/~mvalle
Swiss National Supercomputing Centre (CSCS)      | Tel:  +41 (91)
610.82.60
v. Cantonale Galleria 2, 6928 Manno, Switzerland | Fax:  +41 (91)
610.82.82

_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions- openscen
egraph.org


_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions- openscene
graph.org
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph .
org


_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to