Menu

#105 Compiler warnings about unreferenced formal parameters

open
CCL (28)
5
2012-03-04
2012-03-04
Anonymous
No

When compiling a small subset of the CCL 3.2 headers, I get almost 400 compiler warnings that look like:

CigiIGCtrlV3_2.h : warning C4100: 'bndchk' : unreferenced formal parameter
CigiIncomingMsg.h : warning C4100: 'bndchk' : unreferenced formal parameter
CigiOutgoingMsg.h : warning C4100: 'Sync' : unreferenced formal parameter
CigiSOFV3_2.h : warning C4100: 'bndchk' : unreferenced formal parameter
CigiBaseEntityCtrl.h : warning C4100: 'bndchk' : unreferenced formal parameter
CigiBasePacket.h : warning C4100: 'CnvtVersion' : unreferenced formal parameter
CigiBaseSignalProcessing.h : warning C4100: 'Packet' : unreferenced formal parameter
CigiBaseSOF.h : warning C4100: 'bndchk' : unreferenced formal parameter
CigiHoldEnvCtrl.h : warning C4100: 'Base' : unreferenced formal parameter
CigiHoldEnvCtrl.h : warning C4100: 'Buff' : unreferenced formal parameter
CigiHoldEnvCtrl.h : warning C4100: 'Hold' : unreferenced formal parameter
CigiHoldEnvCtrl.h : warning C4100: 'Spec' : unreferenced formal parameter
CigiHoldEnvCtrl.h : warning C4100: 'Swap' : unreferenced formal parameter

A quick spot-check of the CCL 3.3.3 sources indicates that only a handful of these have been fixed.

The most obvious 'fix' would be to comment out the formal parameter name, i.e., change this:

int SetEntityType(const Cigi_uint16 EntityTypeIn, bool bndchk=true)
{
EntityType = EntityTypeIn;
return(CIGI_SUCCESS);
}

to:

int SetEntityType(const Cigi_uint16 EntityTypeIn, bool /*bndchk*/=true)
{
EntityType = EntityTypeIn;
return(CIGI_SUCCESS);
}

But it's curious what that parameter is doing in the interface when it is so seldom used... `:-|

Discussion

Monday.com Logo