Skip to content

Commit 211bc66

Browse files
committed
Per suggestion from Sean, don't hardcode file or line numbers.
1 parent 1f1965b commit 211bc66

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/exp2cxx/classes_wrapper.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -405,17 +405,17 @@ void SCHEMAprint( Schema schema, FILES * files, void * complexCol, int suffix )
405405
if( suffix == 0 ) {
406406
ocnt = snprintf( sufnm, MAX_LEN, "%s", schnm );
407407
if( ocnt > MAX_LEN ) {
408-
std::cerr << "Warning - classes_wrapper.cc line 425 - sufnm not large enough to hold schnm\n";
408+
std::cerr << "Warning - " << __FILE__ << " line " << __LINE__ << " - sufnm not large enough to hold schnm\n";
409409
}
410410
} else {
411411
ocnt = snprintf( sufnm, MAX_LEN, "%s_%d", schnm, suffix );
412412
if( ocnt > MAX_LEN ) {
413-
std::cerr << "Warning - classes_wrapper.cc line 430 - sufnm not large enough to hold string\n";
413+
std::cerr << "Warning - " << __FILE__ << " line " << __LINE__ << " - sufnm not large enough to hold string\n";
414414
}
415415
}
416416
ocnt = snprintf( fnm, MAX_LEN, "%s.h", sufnm );
417417
if( ocnt > MAX_LEN ) {
418-
std::cerr << "Warning - classes_wrapper.cc line 436 - sufnm not large enough to hold string\n";
418+
std::cerr << "Warning - " << __FILE__ << " line " << __LINE__ << " - sufnm not large enough to hold string\n";
419419
}
420420

421421
if( !( incfile = ( files -> inc ) = FILEcreate( fnm ) ) ) {
@@ -459,7 +459,7 @@ void SCHEMAprint( Schema schema, FILES * files, void * complexCol, int suffix )
459459
// 3. header for namespace to contain all formerly-global variables
460460
ocnt = snprintf( fnm, MAX_LEN, "%sNames.h", schnm );
461461
if( ocnt > MAX_LEN ) {
462-
std::cerr << "Warning - classes_wrapper.cc line 480 - fnm not large enough to hold schnm\n";
462+
std::cerr << "Warning - " << __FILE__ << " line " << __LINE__ << " - fnm not large enough to hold schnm\n";
463463
}
464464

465465
if( !( files->names = FILEcreate( fnm ) ) ) {
@@ -478,7 +478,7 @@ void SCHEMAprint( Schema schema, FILES * files, void * complexCol, int suffix )
478478
/* I.e., if this is our first pass with schema */
479479
ocnt = snprintf( fnm, MAX_LEN, "%s.init.cc", schnm );
480480
if( ocnt > MAX_LEN ) {
481-
std::cerr << "Warning - classes_wrapper.cc line 499 - fnm not large enough to hold string\n";
481+
std::cerr << "Warning - " << __FILE__ << " line " << __LINE__ << " - fnm not large enough to hold string\n";
482482
}
483483

484484
/* Note - We use schnm (without the "_x" suffix sufnm has) since we
@@ -545,7 +545,7 @@ void SCHEMAprint( Schema schema, FILES * files, void * complexCol, int suffix )
545545
/* Just reopen the .init.cc (in append mode): */
546546
ocnt = snprintf( fnm, MAX_LEN, "%s.init.cc", schnm );
547547
if( ocnt > MAX_LEN ) {
548-
std::cerr << "Warning - classes_wrapper.cc line 558 - sufnm not large enough to hold string\n";
548+
std::cerr << "Warning - " << __FILE__ << " line " << __LINE__ << " - sufnm not large enough to hold string\n";
549549
}
550550

551551
initfile = files->init = fopen( fnm, "a" );

0 commit comments

Comments
 (0)