Re: [osg-users] VPB compile error

2009-06-14 Thread Jean-Sébastien Guay

Hi Robert,


I does generate warnings, but really should generate an error as no
return type is clearly an undefined value.


Yes, we agree on that.

Is there perhaps a switch we could add to gcc builds that would turn 
that particular warning into an error? If it's a small thing to add, it 
might be good since as I said it's not the first time I see that kind of 
thing in OSG and VPB when compiling recent changes that were made by a 
gcc user.


Otherwise don't worry about it, we Visual Studio users will keep our 
eyes open (as you gcc users do for us) :-)  The strength of community 
and all that :-)


J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] VPB compile error

2009-06-13 Thread Anna Sokol
Hi Robert,

After an SVN update, VPB build cleanly.
Thanks.

- Anna

_
"Once we accept our limits, we go beyond them. " -- Albert Einstein



On Sat, Jun 13, 2009 at 3:10 AM, Robert Osfield wrote:
> Hi Anna,
>
> Sorry about this, I'm afraid gcc didn't bark at me loud enough about
> this problem (just gave a warning), the code was just a temporary
> placeholder so I didn't worry about every last warning.  The code in
> question has already been replaced, and as far as I know there isn't
> any missing returns - gcc is at least reporting a clean build.  Could
> you do an svn update, this should hopefully fix the build.
>
> Robert.
>
> On Fri, Jun 12, 2009 at 8:48 PM, Anna Sokol wrote:
>> Hi,
>>
>> When I tried to compile the latest SVN version of
>> VirtualPlanetBuilder, there was the following error:
>>
>> 1>-- Build started: Project: vpb, Configuration: Release Win32 --
>> 1>Compiling...
>> 1>DataSet.cpp
>> 1>c:\openscenegraph-vpb-svn\src\vpb\dataset.cpp(2187) : error C4716:
>> 'vpb::DataSet::addPatchedTerrain' : must return a value
>> 1>Build log was saved at
>> "file://c:\OpenSceneGraph-VPB-SVN\src\vpb\vpb.dir\Release\BuildLog.htm"
>> 1>vpb - 1 error(s), 0 warning(s)
>>
>> Based on this the following function in DataSet.cpp should be changed from:
>>
>> bool DataSet::addPatchedTerrain(osgTerrain::TerrainTile*
>> previous_terrain, osgTerrain::TerrainTile* new_terrain)
>> {
>>    addTerrain(new_terrain);
>>
>>    log(osg::NOTICE,"Currently ignoring patch terrainTile
>> %s",previous_terrain->getName().c_str());
>>
>> }
>>
>> To this:
>>
>> bool DataSet::addPatchedTerrain(osgTerrain::TerrainTile*
>> previous_terrain, osgTerrain::TerrainTile* new_terrain)
>> {
>>   log(osg::NOTICE,"Currently ignoring patch terrainTile
>> %s",previous_terrain->getName().c_str());
>>
>>   return addTerrain(new_terrain);
>>
>> }
>>
>> When I did the above, VPB compiled cleanly.
>>
>> Regards,
>> - Anna Sokol
>> _
>> "Once we accept our limits, we go beyond them. " -- Albert Einstein
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] VPB compile error

2009-06-13 Thread Robert Osfield
Hi JS,

On Fri, Jun 12, 2009 at 9:00 PM, Jean-Sébastien
Guay wrote:
> I've always been confused as to why gcc allows you to declare a function
> with a return value and then not have a return statement in it... This is
> not the first time a similar usage needed to be fixed on Windows (but
> compiled fine on gcc).
>
> It just seems nonsensical to me, it should be an error. Is there some
> logical reason why it allows this kind of thing?

I does generate warnings, but really should generate an error as no
return type is clearly an undefined value.  The return issue can
sometimes get screwed by buggy compilers so we do occasionally see
warnings when there is no actual error - such as when you have
conditionals so perhaps the gcc developers have shied away from making
it an error report by default.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] VPB compile error

2009-06-13 Thread Robert Osfield
Hi Anna,

Sorry about this, I'm afraid gcc didn't bark at me loud enough about
this problem (just gave a warning), the code was just a temporary
placeholder so I didn't worry about every last warning.  The code in
question has already been replaced, and as far as I know there isn't
any missing returns - gcc is at least reporting a clean build.  Could
you do an svn update, this should hopefully fix the build.

Robert.

On Fri, Jun 12, 2009 at 8:48 PM, Anna Sokol wrote:
> Hi,
>
> When I tried to compile the latest SVN version of
> VirtualPlanetBuilder, there was the following error:
>
> 1>-- Build started: Project: vpb, Configuration: Release Win32 --
> 1>Compiling...
> 1>DataSet.cpp
> 1>c:\openscenegraph-vpb-svn\src\vpb\dataset.cpp(2187) : error C4716:
> 'vpb::DataSet::addPatchedTerrain' : must return a value
> 1>Build log was saved at
> "file://c:\OpenSceneGraph-VPB-SVN\src\vpb\vpb.dir\Release\BuildLog.htm"
> 1>vpb - 1 error(s), 0 warning(s)
>
> Based on this the following function in DataSet.cpp should be changed from:
>
> bool DataSet::addPatchedTerrain(osgTerrain::TerrainTile*
> previous_terrain, osgTerrain::TerrainTile* new_terrain)
> {
>    addTerrain(new_terrain);
>
>    log(osg::NOTICE,"Currently ignoring patch terrainTile
> %s",previous_terrain->getName().c_str());
>
> }
>
> To this:
>
> bool DataSet::addPatchedTerrain(osgTerrain::TerrainTile*
> previous_terrain, osgTerrain::TerrainTile* new_terrain)
> {
>   log(osg::NOTICE,"Currently ignoring patch terrainTile
> %s",previous_terrain->getName().c_str());
>
>   return addTerrain(new_terrain);
>
> }
>
> When I did the above, VPB compiled cleanly.
>
> Regards,
> - Anna Sokol
> _
> "Once we accept our limits, we go beyond them. " -- Albert Einstein
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] VPB compile error

2009-06-12 Thread Jean-Sébastien Guay

Hi all,

Just a general comment...


'vpb::DataSet::addPatchedTerrain' : must return a value


I've always been confused as to why gcc allows you to declare a function 
with a return value and then not have a return statement in it... This 
is not the first time a similar usage needed to be fixed on Windows (but 
compiled fine on gcc).


It just seems nonsensical to me, it should be an error. Is there some 
logical reason why it allows this kind of thing?


Thanks,

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org