Skip to content

Commit 1f1965b

Browse files
committed
Clear some C++ compilation warnings from the main stepcode libs
1 parent 380618f commit 1f1965b

19 files changed

+91
-50
lines changed

src/base/judy/src/judy.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,7 +1080,7 @@ JudySlot * judy_prv( Judy * judy ) {
10801080
// returning previous entry.
10811081

10821082
JudySlot * judy_del( Judy * judy ) {
1083-
int slot, off, size, type, high;
1083+
int slot, off, size, type;
10841084
JudySlot * table, *inner;
10851085
JudySlot next, *node;
10861086
int keysize, cnt;
@@ -1133,7 +1133,6 @@ JudySlot * judy_del( Judy * judy ) {
11331133
table = ( JudySlot * )( next & JUDY_mask );
11341134
inner = ( JudySlot * )( table[slot >> 4] & JUDY_mask );
11351135
inner[slot & 0x0F] = 0;
1136-
high = slot & 0xF0;
11371136

11381137
for( cnt = 16; cnt--; )
11391138
if( inner[cnt] ) {

src/cldai/sdaiEntity_extent.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void SDAI_Entity_extent::owned_by_( SDAI_Model_contents__list_var& mclv ) {
5656
}
5757

5858
SDAI_Model_contents__list_var SDAI_Entity_extent ::owned_by_() const {
59-
return ( const SDAI_Model_contents__list_var ) &_owned_by;
59+
return ( SDAI_Model_contents__list_var ) &_owned_by;
6060
}
6161

6262
/*

src/cldai/sdaiEntity_extent.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class SC_DAI_EXPORT SDAI_Entity_extent : public SDAI_Session_instance {
5656
return &_instances;
5757
}
5858
SDAI_DAObject__set_var instances_() const {
59-
return ( const SDAI_DAObject__set_var )&_instances;
59+
return ( SDAI_DAObject__set_var )&_instances;
6060
}
6161

6262
// need to implement Model_contents__list

src/cldai/sdaiModel_contents.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ SDAI_Model_contents::instances_() {
2727

2828
SDAI_Model_contents_instances_ptr
2929
SDAI_Model_contents::instances_() const {
30-
return ( const SDAI_Model_contents_instances_ptr ) &_instances;
30+
return ( SDAI_Model_contents_instances_ptr ) &_instances;
3131
}
3232

3333
SDAI_Entity_extent__set_var
@@ -37,7 +37,7 @@ SDAI_Model_contents::folders_() {
3737

3838
SDAI_Entity_extent__set_var
3939
SDAI_Model_contents::folders_() const {
40-
return ( const SDAI_Entity_extent__set_var )&_folders;
40+
return ( SDAI_Entity_extent__set_var )&_folders;
4141
}
4242

4343
SDAI_Entity_extent__set_var
@@ -47,7 +47,7 @@ SDAI_Model_contents::populated_folders_() {
4747

4848
SDAI_Entity_extent__set_var
4949
SDAI_Model_contents::populated_folders_() const {
50-
return ( const SDAI_Entity_extent__set_var )&_populated_folders;
50+
return ( SDAI_Entity_extent__set_var )&_populated_folders;
5151
}
5252

5353
SDAI_PID_DA_ptr SDAI_Model_contents::get_object_pid( const SDAI_DAObject_ptr & d ) const {

src/cldai/sdaiModel_contents.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class SC_DAI_EXPORT SDAI_Model_contents_instances : public SDAI_DAObject {
4040
return &_instances;
4141
}
4242
SDAI_DAObject__set_var contents_() const {
43-
return ( const SDAI_DAObject__set_var ) &_instances;
43+
return ( SDAI_DAObject__set_var ) &_instances;
4444
}
4545

4646
};

src/cldai/sdaiString.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ SDAI_String & SDAI_String::operator= ( const char * s ) {
4141
return *this;
4242
}
4343

44+
SDAI_String & SDAI_String::operator= ( const SDAI_String & s ) {
45+
content = s.content;
46+
return *this;
47+
}
48+
4449
bool SDAI_String::operator== ( const char * s ) const {
4550
return ( content == s );
4651
}

src/cldai/sdaiString.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
*/
1313

1414
#include <sc_export.h>
15+
#include <string>
1516
#include <limits>
1617

1718

@@ -36,6 +37,7 @@ class SC_DAI_EXPORT SDAI_String {
3637

3738
// operators
3839
SDAI_String & operator= ( const char * s );
40+
SDAI_String & operator= ( const SDAI_String & s );
3941
bool operator== ( const char * s ) const;
4042

4143
void clear( void );

src/clstepcore/STEPattribute.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,6 +1353,7 @@ STEPattribute::~STEPattribute() {
13531353
delete ( SDAI_BOOLEAN * ) ptr.e;
13541354
ptr.e = 0;
13551355
}
1356+
break;
13561357
case LOGICAL_TYPE:
13571358
if( ptr.e ) {
13581359
delete ( SDAI_LOGICAL * ) ptr.e;

src/clstepcore/globalRule.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ class SC_CORE_EXPORT Global_rule : public Dictionary_instance {
1414
#pragma warning( disable: 4251 )
1515
#endif
1616
Express_id _name;
17-
std::string _rule_text; // non-SDAI
1817
#ifdef _MSC_VER
1918
#pragma warning( pop )
2019
#endif
2120

2221
Entity__set_var _entities; // not implemented
2322
Where_rule__list_var _where_rules;
2423
Schema_ptr _parent_schema;
24+
std::string _rule_text; // non-SDAI
2525

2626
Global_rule();
2727
Global_rule( const char * n, Schema_ptr parent_sch, const std::string & rt );

src/clstepcore/interfaceSpec.h

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,25 @@ class SC_CORE_EXPORT Interface_spec : public Dictionary_instance {
1313
#pragma warning( push )
1414
#pragma warning( disable: 4251 )
1515
#endif
16-
Express_id _current_schema_id; // schema containing the USE/REF stmt
17-
18-
// non-SDAI, not useful for SDAI use of Interface_spec (it would need to
19-
// be a list).
20-
// schema that defined the USE/REFd objects
21-
Express_id _foreign_schema_id;
16+
Express_id _current_schema_id; // schema containing the USE/REF stmt
2217
#ifdef _MSC_VER
2318
#pragma warning( pop )
2419
#endif
20+
// set of objects from USE/REFERENCE stmt(s)
21+
Explicit_item_id__set_var _explicit_items;
22+
Implicit_item_id__set_var _implicit_items; //not yet initialized for schema
2523

26-
// set of objects from USE/REFERENCE stmt(s)
27-
Explicit_item_id__set_var _explicit_items;
28-
Implicit_item_id__set_var _implicit_items; //not yet initialized for schema
24+
#ifdef _MSC_VER
25+
#pragma warning( push )
26+
#pragma warning( disable: 4251 )
27+
#endif
28+
// non-SDAI, not useful for SDAI use of Interface_spec (it would need to
29+
// be a list).
30+
// schema that defined the USE/REFd objects
31+
Express_id _foreign_schema_id;
32+
#ifdef _MSC_VER
33+
#pragma warning( pop )
34+
#endif
2935

3036
// non-SDAI, not useful for SDAI use of Interface_spec (it would need to
3137
// be a list of ints).

0 commit comments

Comments
 (0)