[omniORB] 'valTruncIds' is not initialized

Duncan Grisby duncan at grisby.org
Wed Apr 2 13:56:24 BST 2008


On Friday 28 March, "Janusz Dalecki" wrote:

> 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         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --



More information about the omniORB-list mailing list