Discussion:
[omniORB] 'valTruncIds' is not initialized
Janusz Dalecki
2008-03-28 10:21:30 UTC
Permalink
I am using OMNIORB_4_1_2 with Visual Studio 2005.

The function 'marshal' in 'valuetype.cc' is giving me a headake as it
has uninitialized variable 'valTruncIds'. When it tries to pass that
variable to another function 'marshalHeaderAndBody' debugger detects it
and displays a dialog box "Run-Time Check Failure #3 - The variable
'valTruncIds' is being used without being defined."

Is there any quick fix for that somewhere?

Any help most appreciated.

Regards,

Janusz

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20080328/0e11a045/attachment.htm
Duncan Grisby
2008-04-02 17:56:13 UTC
Permalink
Post by Janusz Dalecki
I am using OMNIORB_4_1_2 with Visual Studio 2005.
The function 'marshal' in 'valuetype.cc' is giving me a headake as it
has uninitialized variable 'valTruncIds'. When it tries to pass that
variable to another function 'marshalHeaderAndBody' debugger detects it
and displays a dialog box "Run-Time Check Failure #3 - The variable
'valTruncIds' is being used without being defined."
Visual Studio is trying to be too clever for its own good. If you trace
the logic, you'll see that although valTruncIds is indeed passed
uninitialised in some circumstances, the parameter is only used in those
cases where it has been initialised.

You can avoid the complaint from Visual Studio by simply initialising
valTruncIds to zero. I'll do that for future releases, even though the
code is actually fine as it currently stands.

Cheers,

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
Loading...