Skip to content

Commit 111172a

Browse files
committed
quell unused parameter warnings in certain functions
- only in functions that shouldn't be called or are unimplemented - implemented some of the obvious ones, print error messages in the others
1 parent 1e5bc0d commit 111172a

File tree

3 files changed

+41
-2
lines changed

3 files changed

+41
-2
lines changed

src/cldai/sdaiModel_contents.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,20 @@ SDAI_Model_contents::populated_folders_() const {
5151
}
5252

5353
SDAI_PID_DA_ptr SDAI_Model_contents::get_object_pid( const SDAI_DAObject_ptr & d ) const {
54+
std::cerr << __FILE__ << ":" << __LINE__ << " - SDAI_Model_contents::get_object_pid() unimplemented!" << std::endl;
55+
(void) d; //unused
5456
return 0;
5557
}
5658

5759
SDAI_DAObject_ptr SDAI_Model_contents::lookup( const SDAI_PID_DA_ptr & p ) const {
60+
std::cerr << __FILE__ << ":" << __LINE__ << " - SDAI_Model_contents::lookup() unimplemented!" << std::endl;
61+
(void) p; //unused
5862
return 0;
5963
}
6064

6165
SDAI_DAObject_ptr SDAI_Model_contents::CreateEntityInstance( const char * Type ) {
66+
std::cerr << __FILE__ << ":" << __LINE__ << " - SDAI_Model_contents::CreateEntityInstance() unimplemented!" << std::endl;
67+
(void) Type; //unused
6268
return 0;
6369
}
6470

src/clstepcore/ExpDict.cc

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,15 @@ void Schema::AddGlobal_rule( Global_rule_ptr gr ) {
332332
_global_rules->Append( gr );
333333
}
334334

335-
/// not implemented
335+
/// hope I did this right (MP) - was "not implemented"
336336
void Schema::global_rules_( Global_rule__set_var & grs ) {
337+
if( _global_rules ) {
338+
if( _global_rules->Count() > 0 ) {
339+
std::cerr << "In " << __FILE__ << ", Schema::global_rules_(): overwriting non-empty global rule set!" << std::endl;
340+
}
341+
delete _global_rules;
342+
}
343+
_global_rules = grs;
337344
}
338345

339346
void Schema::AddProcedure( const std::string & p ) {
@@ -994,9 +1001,11 @@ const EntityDescriptor * EntityDescriptor::IsA( const EntityDescriptor * other )
9941001
}
9951002

9961003
Type_or_rule::Type_or_rule() {
1004+
std::cerr << "WARNING - Type_or_rule class doesn't seem to be complete - it has no members!" << std::endl;
9971005
}
9981006

999-
Type_or_rule::Type_or_rule( const Type_or_rule & tor ) {
1007+
Type_or_rule::Type_or_rule( const Type_or_rule & tor ): Dictionary_instance() {
1008+
(void) tor; //TODO once this class has some members, we'll actually have something to copy
10001009
}
10011010

10021011
Type_or_rule::~Type_or_rule() {
@@ -1240,9 +1249,23 @@ Global_rule::~Global_rule() {
12401249
}
12411250

12421251
void Global_rule::entities_( const Entity__set_var & e ) {
1252+
if( _entities ) {
1253+
if( _entities->EntryCount() > 0 ) {
1254+
std::cerr << "In " << __FILE__ << ", Global_rule::entities_(): overwriting non-empty entity set!" << std::endl;
1255+
}
1256+
delete _entities;
1257+
}
1258+
_entities = e;
12431259
}
12441260

12451261
void Global_rule::where_rules_( const Where_rule__list_var & wrl ) {
1262+
if( _where_rules ) {
1263+
if( _where_rules->Count() > 0 ) {
1264+
std::cerr << "In " << __FILE__ << ", Global_rule::where_rules_(): overwriting non-empty rule set!" << std::endl;
1265+
}
1266+
delete _where_rules;
1267+
}
1268+
_where_rules = wrl;
12461269
}
12471270

12481271
///////////////////////////////////////////////////////////////////////////////

src/clstepcore/STEPaggregate.cc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ STEPaggregate::~STEPaggregate() {
4949
}
5050

5151
STEPaggregate & STEPaggregate::ShallowCopy( const STEPaggregate & a ) {
52+
(void) a; // unused
5253
cerr << "Internal error: " << __FILE__ << ": " << __LINE__
5354
<< "\n" << _POC_ "\n";
5455
cerr << "function: STEPaggregate::ShallowCopy \n" << "\n";
@@ -273,6 +274,7 @@ void STEPaggregate::Empty() {
273274

274275
Severity STEPnode::StrToVal( const char * s, ErrorDescriptor * err ) {
275276
// defined in subtypes
277+
(void) s; //unused
276278
cerr << "Internal error: " << __FILE__ << ": " << __LINE__ << "\n" ;
277279
err->AppendToDetailMsg(
278280
" function: STEPnode::StrToVal() called instead of virtual function.\n"
@@ -286,6 +288,7 @@ Severity STEPnode::StrToVal( const char * s, ErrorDescriptor * err ) {
286288

287289
Severity STEPnode::StrToVal( istream & in, ErrorDescriptor * err ) {
288290
// defined in subtypes
291+
(void) in; //unused
289292
cerr << "Internal error: " << __FILE__ << ": " << __LINE__ << "\n" ;
290293
err->AppendToDetailMsg(
291294
" function: STEPnode::StrToVal() called instead of virtual function.\n"
@@ -299,6 +302,7 @@ Severity STEPnode::StrToVal( istream & in, ErrorDescriptor * err ) {
299302

300303
Severity STEPnode::STEPread( const char * s, ErrorDescriptor * err ) {
301304
// defined in subclasses
305+
(void) s; //unused
302306
cerr << "Internal error: " << __FILE__ << ": " << __LINE__ << "\n" ;
303307
cerr << "function: STEPnode::STEPread called instead of virtual function.\n"
304308
<< _POC_ << "\n";
@@ -313,6 +317,7 @@ Severity STEPnode::STEPread( const char * s, ErrorDescriptor * err ) {
313317
}
314318

315319
Severity STEPnode::STEPread( istream & in, ErrorDescriptor * err ) {
320+
(void) in; //unused
316321
cerr << "Internal error: " << __FILE__ << ": " << __LINE__ << "\n" ;
317322
cerr << "function: STEPnode::STEPread called instead of virtual function.\n"
318323
<< _POC_ << "\n";
@@ -327,6 +332,7 @@ Severity STEPnode::STEPread( istream & in, ErrorDescriptor * err ) {
327332

328333
const char * STEPnode::asStr( std::string & s ) {
329334
// defined in subclasses
335+
(void) s; //unused
330336
cerr << "Internal error: " << __FILE__ << ": " << __LINE__ << "\n" ;
331337
cerr << "function: STEPnode::asStr called instead of virtual function.\n"
332338
<< _POC_ << "\n";
@@ -350,13 +356,16 @@ const char * STEPnode::asStr( std::string & s ) {
350356
* SCLundefined's, this is not implemented.)
351357
*/
352358
const char * STEPnode::STEPwrite( std::string & s, const char * currSch ) {
359+
(void) s; //unused
360+
(void) currSch; //unused
353361
cerr << "Internal error: " << __FILE__ << ": " << __LINE__ << "\n" ;
354362
cerr << "function: STEPnode::STEPwrite called instead of virtual function.\n"
355363
<< _POC_ << "\n";
356364
return "";
357365
}
358366

359367
void STEPnode::STEPwrite( ostream & out ) {
368+
(void) out; //unused
360369
cerr << "Internal error: " << __FILE__ << ": " << __LINE__ << "\n" ;
361370
cerr << "function: STEPnode::STEPwrite called instead of virtual function.\n"
362371
<< _POC_ << "\n";
@@ -873,6 +882,7 @@ Severity SelectNode::STEPread( const char * s, ErrorDescriptor * err,
873882
Severity SelectNode::STEPread( istream & in, ErrorDescriptor * err,
874883
const TypeDescriptor * elem_type,
875884
InstMgr * insts, int addFileId, const char * currSch ) {
885+
(void) elem_type; //unused
876886
if( !node ) {
877887
cerr << "Internal error: " << __FILE__ << ": " << __LINE__ << "\n"
878888
<< _POC_ "\n";

0 commit comments

Comments
 (0)