HI Cendric,

The line that is trigger this warning is essentially of the form:

  float myValue
  ostream << "this is very silly, can't even write out a float these
days "<<myValue<<std::endl;

This is of course perfectly valid C++, this screams out a bug in the
standard library, or the compiler, and not in the OSG.  The only thing
we can do is disable this particular warning as it's clearly bogus.
Note, not all versions of gcc has this bug, for instance I'm using
4.3.2 and don't get these errors.

I'm just testing the removal of the --format==2 entry from the
aggressive warnings.  I'll check this in once I've got a complete
build of the 2.8 branch.

Robert.

On Thu, Feb 5, 2009 at 9:41 AM, Cedric Pinson <morni...@plopbyte.net> wrote:
> I am not sure if it's related or not but i tried to compile the trunk this
> morning and here the warning i get.
>
> [ 8%] Building CXX object src/osg/CMakeFiles/osg.dir/OcclusionQueryNode.o
> /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4/i686-pc-linux-gnu/bits/c++locale.h:
> In function 'int std::__convert_from_v(char*, int, const char*, _Tv,
> __locale_struct* const&, int) [with _Tv = double]':
> /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.tcc:1074:
> instantiated from '_OutIter std::num_put<_CharT,
> _OutIter>::_M_insert_float(_OutIter, std::ios_base&, _CharT, char, _ValueT)
> const [with _ValueT = double, _CharT = char, _OutIter =
> std::ostreambuf_iterator<char, std::char_traits<char> >]'
> /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.tcc:1234:
> instantiated from '_OutIter std::num_put<_CharT, _OutIter>::do_put(_OutIter,
> std::ios_base&, _CharT, double) const [with _CharT = char, _OutIter =
> std::ostreambuf_iterator<char, std::char_traits<char> >]'
> /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h:2350:
> instantiated from '_OutIter std::num_put<_CharT, _OutIter>::put(_OutIter,
> std::ios_base&, _CharT, double) const [with _CharT = char, _OutIter =
> std::ostreambuf_iterator<char, std::char_traits<char> >]'
> /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4/bits/ostream.tcc:370:
> instantiated from 'std::basic_ostream<_CharT, _Traits>&
> std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char,
> _Traits = std::char_traits<char>]'
> /home/mornifle/dev/osg-trunk/src/osg/OcclusionQueryNode.cpp:269:
> instantiated from here
> /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4/i686-pc-linux-gnu/bits/c++locale.h:86:
> warning: format not a string literal, argument types not checked
> /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4/i686-pc-linux-gnu/bits/c++locale.h:86:
> warning: format not a string literal, argument types not checked
>
> Cheers,
> Cedric
>
> Robert Osfield wrote:
>>
>> Hi JS,
>>
>> Thanks for the warning fixes, I've merged about 2/3rds of them, but
>> will record some of the other ones.   The server isn't accessible
>> right now so I'm not able to check in right now.  I'll have  bash
>> tomorrow morning.  These last warning fixes won't affect runtime at
>> all so the 2.8.0-rc1 as it stands right now should be good enough for
>> testing.
>>
>> Robert.
>>
>> On Wed, Feb 4, 2009 at 5:44 PM, Jean-Sébastien Guay
>> <jean-sebastien.g...@cm-labs.com> wrote:
>>
>>>
>>> Hi Robert,
>>>
>>>
>>>>
>>>> As I said on my other post, I don't seem to get any warnings (other than
>>>> "can't open build log for writing", which is weird but benign - the
>>>> warnings
>>>> if any would still go to stdout and thus get reported in the CDash
>>>> warnings
>>>> page for the build). I'll try another full rebuild and see for sure.
>>>> Then if
>>>> I get any I'll see what needs to be done.
>>>>
>>>
>>> OK, I've had a go at fixing the warnings. I've attached a zip containing
>>> the
>>> build output before the fixes for you to see, as well as the changed
>>> files.
>>>
>>> The PDB warnings (which come from the fact that a given 3rd party library
>>> was compiled with debug information split into a separate file instead of
>>> embedded into the library) we can just ignore. They only happen at link
>>> time
>>> for the given plugin. Same thing for the "default library MSVCRT
>>> conflicts..." warning, though that might indicate a bigger problem. The
>>> next
>>> time someone makes a 3rd party package, those things should be taken care
>>> of.
>>>
>>> Other than that, here are the warnings I fixed:
>>>
>>> _______________________________________
>>>
>>> osgUtil.lib and osglauncher example
>>>
>>> 4>C:\Tools\msvs8\VC\include\list(42) : warning C4510:
>>> 'std::_List_nod<_Ty,_Alloc>::_Node' : default constructor could not be
>>> generated
>>>
>>> (and other similar and related warnings)
>>>
>>> Simply adding an empty default constructor to the arc class in
>>> TriStrip_graph_array.h and the Xample class in osglauncher.cpp fixed this
>>>
>>> You could see that std::list was not the problem, but the class used as a
>>> template argument, because lower in the warning message there was mention
>>> of
>>>
>>> 4>
>>>
>>> c:\dev\openscenegraph-svn\openscenegraph-2.8-branch\src\osgutil\TriStrip_graph_array.h(109)
>>> : see reference to class template instantiation 'std::list<_Ty>' being
>>> compiled
>>> 4>        with
>>> 4>        [
>>> 4>
>>>
>>> _Ty=triangle_stripper::common_structures::graph_array<triangle_stripper::triangle,char>::arc
>>> 4>        ]
>>>
>>> which pointed to the type to which a default constructor needed to be
>>> added.
>>> It comes down to deciphering VS's messages... :-)
>>> _______________________________________
>>>
>>> osga plugin
>>>
>>> 198>..\..\..\..\src\osgPlugins\osga\OSGA_Archive.cpp(727) : warning
>>> C4512:
>>> 'OSGA_Archive::WriteObjectFunctor' : assignment operator could not be
>>> generated
>>> 198>        ..\..\..\..\src\osgPlugins\osga\OSGA_Archive.cpp(719) : see
>>> declaration of 'OSGA_Archive::WriteObjectFunctor'
>>>
>>> (and so on for the other Write*Functors)
>>>
>>> I didn't find any way to fix this other than locally suppressing it,
>>> since
>>> creating a default constructor would imply constructing a default
>>> osg::Object, which is abstract so I can't do that. So I suppressed it
>>> around
>>> those 4 classes.
>>> _______________________________________
>>>
>>> cfg plugin and osgviewerGLUT example
>>>
>>> You had tried suppressing warnings in these two cases, protected by
>>>
>>> #if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS)
>>>
>>> but you needed to include <osg/Config> before that, so that
>>> OSG_DISABLE_MSVC_WARNINGS was defined...
>>> _______________________________________
>>>
>>> osgviewerQT example
>>>
>>>
>>> 26>c:\tools\qt\4.4.3\include\qtcore\../../src/corelib/concurrent/qtconcurrentiteratekernel.h(97)
>>> : warning C4512: 'QtConcurrent::BlockSizeManager' : assignment operator
>>> could not be generated
>>> 26>
>>>
>>> c:\tools\qt\4.4.3\include\qtcore\../../src/corelib/concurrent/qtconcurrentiteratekernel.h(79)
>>> : see declaration of 'QtConcurrent::BlockSizeManager'
>>>
>>> Since this is in Qt's headers, I just suppressed this locally (for both
>>> Qt 4
>>> and Qt 3 - I'm using Qt 4 and I have no way of knowing if this appears
>>> for
>>> Qt 3).
>>> _______________________________________
>>>
>>> I'm doing a full rebuild now (and as you all know now thanks to the
>>> dashboard reports, this takes 20 minutes on my machine if nothing else is
>>> happening) so I'll tell you when this is done if any fixable warnings
>>> remain, but I think it should look good.
>>>
>>> Of course as we can see from osgviewerQT, there are perhaps warnings
>>> lurking
>>> in other examples/plugins which I don't compile... Others will have to
>>> pitch
>>> in for fixing those.
>>>
>>> J-S
>>> --
>>> ______________________________________________________
>>> Jean-Sebastien Guay    jean-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
>>>
>>>
>>>
>>
>> _______________________________________________
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>
> --
> +33 (0) 6 63 20 03 56  Cedric Pinson mailto:morni...@plopbyte.net
> http://www.plopbyte.net
>
>
> _______________________________________________
> 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

Reply via email to