Skip to content

Commit 8d42237

Browse files
committed
Fixing continues.
1 parent 99ca3e4 commit 8d42237

File tree

6 files changed

+11
-6
lines changed

6 files changed

+11
-6
lines changed

src/misc/util/abc_global.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,8 @@ static inline int Abc_Base2LogW( word n ) { int r; if ( n <
292292
static inline int Abc_Base10LogW( word n ) { int r; if ( n < 2 ) return (int)n; for ( r = 0, n--; n; n /= 10, r++ ) {}; return r; }
293293
static inline int Abc_Base16LogW( word n ) { int r; if ( n < 2 ) return (int)n; for ( r = 0, n--; n; n /= 16, r++ ) {}; return r; }
294294
static inline char * Abc_UtilStrsav( char * s ) { return s ? strcpy(ABC_ALLOC(char, strlen(s)+1), s) : NULL; }
295-
static inline char * Abc_UtilStrsavTwo( char * s, char * a ){ char * r; if (!a) return Abc_UtilStrsav(s); r = ABC_ALLOC(char, strlen(s)+strlen(a)+1); sprintf(r, "%s%s", s, a ); return r; }
296-
static inline char * Abc_UtilStrsavNum( char * s, int n ) { char * r; if (!s) return NULL; r = ABC_ALLOC(char, strlen(s)+12+1); sprintf(r, "%s%d", s, n ); return r; }
295+
static inline char * Abc_UtilStrsavTwo( char * s, char * a ){ char * r; if (!a) return Abc_UtilStrsav(s); r = ABC_ALLOC(char, strlen(s)+strlen(a)+1); snprintf(r, strlen(s)+strlen(a)+1, "%s%s", s, a ); return r; }
296+
static inline char * Abc_UtilStrsavNum( char * s, int n ) { char * r; if (!s) return NULL; r = ABC_ALLOC(char, strlen(s)+12+1); snprintf(r, strlen(s)+12+1, "%s%d", s, n ); return r; }
297297
static inline int Abc_BitByteNum( int nBits ) { return (nBits>>3) + ((nBits&7) > 0); }
298298
static inline int Abc_BitWordNum( int nBits ) { return (nBits>>5) + ((nBits&31) > 0); }
299299
static inline int Abc_Bit6WordNum( int nBits ) { return (nBits>>6) + ((nBits&63) > 0); }

src/misc/util/utilDouble.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@ static inline void Xdbl_Test()
183183
xdbl ten100_ = ABC_CONST(0x014c924d692ca61b);
184184

185185
assert( ten100 == ten100_ );
186+
(void)ten100;
187+
(void)ten100_;
186188

187189
// float f1 = Xdbl_ToDouble(c1);
188190
// Extra_PrintBinary( stdout, (int *)&c1, 32 ); printf( "\n" );

src/misc/util/utilTruth.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1595,6 +1595,7 @@ static inline int Abc_TtReadBin( word * pWords, int nWords, char * pString )
15951595
{
15961596
int i, Len = (int)strlen(pString), nWords2 = (Len+63)/64;
15971597
assert( nWords2 <= nWords );
1598+
(void)nWords2;
15981599
memset( pWords, 0, sizeof(word)*nWords );
15991600
for ( i = 0; i < Len; i++ )
16001601
if ( pString[i] == '1' )
@@ -1608,6 +1609,7 @@ static inline word Abc_TtReadBin64( char * pString )
16081609
word Word = 0;
16091610
int Len = (int)strlen(pString);
16101611
assert( Len <= 64 );
1612+
(void)Len;
16111613
int Res = Abc_TtReadBin( &Word, 1, pString );
16121614
if ( Res == 0 ) {
16131615
printf( "Reading binary string \"%s\" has failed.\n", pString );
@@ -1842,6 +1844,7 @@ static inline int Abc_TtCheckCondDep( word * pTruth, int nVars, int nSuppLim )
18421844
word Cof0[128], Cof1[128]; // pow( 2, nVarsMax-6 )
18431845
int v, d, nWords = Abc_TtWordNum(nVars);
18441846
assert( nVars <= nVarsMax );
1847+
(void)nVarsMax;
18451848
if ( nVars <= nSuppLim + 1 )
18461849
return 0;
18471850
for ( v = 0; v < nVars; v++ )

src/misc/vec/vecMem.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ static inline void Vec_MemDumpTruthTables( Vec_Mem_t * p, char * pName, int nLut
458458
{
459459
FILE * pFile;
460460
char pFileName[1000];
461-
sprintf( pFileName, "tt_%s_%02d.txt", pName ? pName : NULL, nLutSize );
461+
snprintf( pFileName, sizeof(pFileName), "tt_%s_%02d.txt", pName ? pName : "", nLutSize );
462462
pFile = pName ? fopen( pFileName, "wb" ) : stdout;
463463
Vec_MemDump( pFile, p );
464464
if ( pFile != stdout )
@@ -475,4 +475,3 @@ ABC_NAMESPACE_HEADER_END
475475
////////////////////////////////////////////////////////////////////////
476476
/// END OF FILE ///
477477
////////////////////////////////////////////////////////////////////////
478-

src/opt/ufar/UfarMgr.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,7 @@ Vec_Int_t * SimUifPairFinder::_collect_sim_nodes(Wlc_Ntk_t * pNtk) {
525525
int i;
526526
Wlc_Obj_t * pPo;
527527
int range = Wlc_ObjRange(Wlc_NtkPo(pNtk, 1));
528+
(void)range;
528529
Wlc_NtkForEachPo(pNtk, pPo, i) {
529530
if ((i%3)==0) continue;
530531
assert(range == Wlc_ObjRange(pPo));
@@ -1419,7 +1420,7 @@ int UfarManager::PerformUIFProve(const timeval& timer) {
14191420
auto print_stat = [&]() {
14201421
gettimeofday(&curTime, NULL);
14211422
elapsedTime = elapsed_time_usec(timer, curTime)/1000000.0;
1422-
sprintf(buffer, "Iteration[%2u][%3u]: %4lu White boxes\t%4lu UIF constraints (time = %.4f)", n_iter_wb, n_iter_uif, count(_vec_op_blackbox_marks.begin(), _vec_op_blackbox_marks.end(), false), _set_uif_pairs.size(), elapsedTime);
1423+
snprintf(buffer, sizeof(buffer), "Iteration[%2u][%3u]: %4lu White boxes\t%4lu UIF constraints (time = %.4f)", n_iter_wb, n_iter_uif, count(_vec_op_blackbox_marks.begin(), _vec_op_blackbox_marks.end(), false), _set_uif_pairs.size(), elapsedTime);
14231424
LOG(1) << buffer << _get_profile_uf_wb();
14241425
dump_grey_stat();
14251426
if(!params.fileStatesOut.empty()) _dump_states(params.fileStatesOut);

src/opt/ufar/UfarMgr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ using IntPair = std::pair<int, int>;
3535

3636
struct OperatorID;
3737
struct UifPair;
38-
struct Greyness;
38+
class Greyness;
3939
using UIF_PAIR = UifPair;
4040

4141
class SimUifPairFinder;

0 commit comments

Comments
 (0)