Forum Stats

  • 3,770,034 Users
  • 2,253,052 Discussions
  • 7,875,276 Comments

Discussions

Oracle 12.2 Pro*C - Visual C++ Warning - Declaration of sqlstm hides global declaration

User_EOL1Q
User_EOL1Q Member Posts: 12 Green Ribbon
edited Mar 31, 2021 8:43PM in Oracle Call Interface (OCI)

Hello,

Environment:

Win10 64bit

Visual Studio 2015 with update 3

Oracle 12.2 64bit client with Pro*C

The *.cpp file generated from the *.pc file is generating the following warning

struct sqlexd sqlstm; //this causes a C4459 warning


C4459 declaration of slqstm hides global declaration


The cpp file below is automatically generated by the *.pc file.

//generated by pro*c
static struct sqlexd {
param1
param2
...
} sqlstm  {13,2}


int function1 ()
{
  struct sqlexd sqlstm;  //hides global sqlstm from above
  sqlstm.slvsn = 13
  sqlstm.arrsiz = 2
}

I'm not quite sure how to resolve this warning as the *.cpp a auto-generated file

Thanks for the help!

Answers