[gme-users] BON2 interpreter - VC7.1 warning C4930 seems harmful
Gabriele Trombetti
gabtromb at isis.vanderbilt.edu
Thu Feb 19 14:25:06 CST 2004
Hi all,
I'm trying to make an interpreter with Visual C++ 7.1
I'm using the stlport.
I have patched the ComponentLib.h as described. The extern "C" errors
went away and it compiles now.
But there are 4 warnings, the worst of which is this one, please do have
a look:
------
c:\Program Files\GME\SDK\BON\BONImpl.cpp(3220) : warning C4930:
'BON::FCO getType(void)': prototyped function not called (was a variable
definition intended?)
------
The line which generates the problem is:
------
void FCOImpl::onObjectCreated()
{
FCO( getType() ); // <----------------- THIS ONE
getReferencePorts();
// Temporary Solution ... Eliminate If Event Paremeters Available
ObjectPtr spObject;
COMTHROW( getObjectI()->GetParent( spObject.Addr() ) );
Model model( ObjectImpl::attachI( spObject, (ProjectImpl*)
getProject().getCounted() ) );
if ( model )
model->onChildAdded( this );
// Temporary Solution END
}
------
I really don't know/can't understand what you are doing which those two
first lines.
Did you mean to CALL those two functions? You are not getting their
return objects, so... are you using them to modify the data members?
Anyway the warning says that (due to the new ANSI C++ specs, I think)
the first line is interpreted as a function declaration (a function
prototype; which you are not using, BTW) and NOT AS A FUNCTION CALL:
that function will not be called. Is this what you intended to do? I
doubt that...
Have a look at this newsgroup discussion related to that warning:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&safe=off&threadm=q15zU3EADHA.2280%40cpmsftngxa06.phx.gbl&rnum=2&prev=/groups%3Fq%3DC4930%2Bprototyped%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26safe%3Doff%26selm%3Dq15zU3EADHA.2280%2540cpmsftngxa06.phx.gbl%26rnum%3D2
Could you fix that warning, and/or tell us how to fix that?
FYI: the other 3 warnings I get (probably harmless, these ones)
---------
c:\Program Files\GME\SDK\BON\BONImpl.cpp(69) : warning C4927: illegal
conversion; more than one user-defined conversion has been implicitly
applied
while calling the constructor
'MON::Containment::Containment(IMgaMetaBase *)'
c:\Program Files\GME\SDK\BON\MON.h(474) : see declaration of
'MON::Containment::Containment'
---------
LINK : warning LNK4075: ignoring '/EDITANDCONTINUE' due to
'/INCREMENTAL:NO' specification
Creating library .\Debug/lesson3_interpreterBON2Component.lib and
object .\Debug/lesson3_interpreterBON2Component.exp
---------
lesson3_interpreterBON2Component.exp : warning LNK4070:
/OUT:lesson3_interpreter.DLL directive in .EXP differs from output
filename '.\Debug/lesson3_interpreterBON2Component.dll'; ignoring directive
Thanks in advance
Gabriele
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.isis.vanderbilt.edu/pipermail/gme-users/attachments/20040219/d6ef0cbb/attachment.htm
More information about the gme-users
mailing list