Hi Sukender,

If we can't work out what it's on a bout and the warning looks benign,
should we just suppress it?

Robert.

On Tue, Feb 3, 2009 at 1:56 PM, Sukender <suky0...@free.fr> wrote:
> Hi Robert,
>
> Not many ideas, but:
> - This may be related to the "IC" class used at this moment. Unfortunately, 
> there is no clue in the log about which "IC" causes it, except it's in osgDB 
> wrapper. So this may be the DatabasePager. Perhaps is it linked to:
>        I_StaticMethod0(osgDB::DatabasePager *, create,
>                        __DatabasePager_P1__create_S,
>                        "create a DatabasePager by cloning 
> DatabasePager::prototype(). ",
>                        "");
> in DatabasePager.cpp?
>
> - Could this be related to the fact that ConstructorInfo is private 
> inheritance? I guess no, but...
> - Just for info, the help says VC generates 4702 when a catch() block cannot 
> be reached (when functions called in try() are all "C", because extern C 
> functions are assumed to not throw).
>
> Sukender
> PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/
>
>
> Le Tue, 03 Feb 2009 14:32:59 +0100, Robert Osfield <robert.osfi...@gmail.com> 
> a écrit:
>
>> Hi All,
>>
>> I'm look at the follow warning under Windows.  I can't figure out why
>> there is a warning of this type:
>>
>> 152>d:\prog\libs\openscenegraph\include\osgintrospection\typedconstructorinfo(36)
>> : warning C4702: unreachable code
>>
>>
>> The code is:
>>
>>
>>     template<typename C, typename IC>
>>     struct TypedConstructorInfo0: ConstructorInfo
>>     {
>>         TypedConstructorInfo0(const ParameterInfoList& plist,
>> std::string briefHelp = std::string(), std::string detailedHelp =
>> std::string())
>>         :    ConstructorInfo(typeof(C), plist, briefHelp, detailedHelp)
>>         {
>>         }
>>
>>         Value createInstance(ValueList&  /*args*/) const
>>         {
>>             return IC::create();
>>         } <<<<<<< This is line 36 for which the warning is being emited.
>>
>>     };
>>
>> The offending line is overriding a virtual createInstance(ValueList&)
>> const method from the ConstructorInfo base class.  This usage pattern
>> is also used in the many other template classes in
>> include/osgIntrospection/TypedConstructorInfo but none generate
>> warnings...
>>
>> Strange, any chance that someone can shine some light on this warning?
>> Robert.
>> _______________________________________________
>> 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

Reply via email to