Skip to content

Commit a3ed45a

Browse files
committed
eliminate error and warning in p21read.cc
1 parent 4f94a13 commit a3ed45a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/test/p21read/p21read.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ void checkSchemaName( Registry & reg, STEPfile & sf, bool ignoreErr ) {
7171
SDAI_Application_instance * ai =
7272
sf.HeaderInstances()->FindFileId( 3 )->GetApplication_instance();
7373
while( ( attr = ai->NextAttribute() ) ) {
74-
attr->asStr( sname );
74+
sname = attr->asStr();
7575
while( ( sc = reg.NextSchema() ) ) {
7676
if( compareOneSchName( sname, sc->Name() ) ) {
7777
match = true;
@@ -115,7 +115,9 @@ int main( int argc, char * argv[] ) {
115115
if( argc > 4 || argc < 2 ) {
116116
printUse( argv[0] );
117117
}
118-
while( ( c = sc_getopt( argc, argv, "itsv" ) ) != -1 ) {
118+
119+
char opts[] = "itsv";
120+
while( ( c = sc_getopt( argc, argv, opts ) ) != -1 ) {
119121
switch( c ) {
120122
case 'i':
121123
ignoreErr = true;

0 commit comments

Comments
 (0)