diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2017-04-28 09:46:10 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2017-04-28 09:46:10 -0700 |
commit | 68faa04aff73740d86dcdcdc66e91a4d7bbd1a4e (patch) | |
tree | caa05ff420ad07353df3c0c163318d77b1053860 | |
parent | 1faab72a6c4433027e691fb8547a994f56993f67 (diff) | |
download | abc-68faa04aff73740d86dcdcdc66e91a4d7bbd1a4e.tar.gz abc-68faa04aff73740d86dcdcdc66e91a4d7bbd1a4e.tar.bz2 abc-68faa04aff73740d86dcdcdc66e91a4d7bbd1a4e.zip |
Compiler warnings.
-rw-r--r-- | src/misc/util/abc_global.h | 6 | ||||
-rw-r--r-- | src/misc/vec/vecStr.h | 2 | ||||
-rw-r--r-- | src/sat/bsat/satClause.h | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/misc/util/abc_global.h b/src/misc/util/abc_global.h index 9e906816..b68d7b4c 100644 --- a/src/misc/util/abc_global.h +++ b/src/misc/util/abc_global.h @@ -312,16 +312,16 @@ static inline void Abc_Print( int level, const char * format, ... ) printf( "Warning: " ); }else{ if ( level == ABC_ERROR ) - Gia_ManToBridgeText( stdout, strlen("Error: "), (unsigned char*)"Error: " ); + Gia_ManToBridgeText( stdout, (int)strlen("Error: "), (unsigned char*)"Error: " ); else if ( level == ABC_WARNING ) - Gia_ManToBridgeText( stdout, strlen("Warning: "), (unsigned char*)"Warning: " ); + Gia_ManToBridgeText( stdout, (int)strlen("Warning: "), (unsigned char*)"Warning: " ); } va_start( args, format ); if ( Abc_FrameIsBridgeMode() ) { char * tmp = vnsprintf( format, args ); - Gia_ManToBridgeText( stdout, strlen(tmp), (unsigned char*)tmp ); + Gia_ManToBridgeText( stdout, (int)strlen(tmp), (unsigned char*)tmp ); free( tmp ); } else diff --git a/src/misc/vec/vecStr.h b/src/misc/vec/vecStr.h index 04cd5da8..ef5e9a41 100644 --- a/src/misc/vec/vecStr.h +++ b/src/misc/vec/vecStr.h @@ -671,7 +671,7 @@ static inline void Vec_StrPrintNumStar( Vec_Str_t * p, int Num, int nDigits ) ***********************************************************************/ static inline void Vec_StrPrintStr( Vec_Str_t * p, const char * pStr ) { - int i, Length = strlen(pStr); + int i, Length = (int)strlen(pStr); for ( i = 0; i < Length; i++ ) Vec_StrPush( p, pStr[i] ); } diff --git a/src/sat/bsat/satClause.h b/src/sat/bsat/satClause.h index 0b1756ff..494fef6c 100644 --- a/src/sat/bsat/satClause.h +++ b/src/sat/bsat/satClause.h @@ -199,8 +199,8 @@ static inline void Sat_MemAlloc_( Sat_Mem_t * p, int nPageSize ) p->uPageMask = (unsigned)((1 << nPageSize) - 1); p->nPagesAlloc = 256; p->pPages = ABC_CALLOC( int *, p->nPagesAlloc ); - p->pPages[0] = ABC_ALLOC( int, (1 << p->nPageSize) ); - p->pPages[1] = ABC_ALLOC( int, (1 << p->nPageSize) ); + p->pPages[0] = ABC_ALLOC( int, (((unsigned)1) << p->nPageSize) ); + p->pPages[1] = ABC_ALLOC( int, (((unsigned)1) << p->nPageSize) ); p->iPage[0] = 0; p->iPage[1] = 1; Sat_MemWriteLimit( p->pPages[0], 2 ); @@ -315,7 +315,7 @@ static inline int Sat_MemAppend( Sat_Mem_t * p, int * pArray, int nSize, int lrn p->nPagesAlloc *= 2; } if ( p->pPages[p->iPage[lrn]] == NULL ) - p->pPages[p->iPage[lrn]] = ABC_ALLOC( int, (1 << p->nPageSize) ); + p->pPages[p->iPage[lrn]] = ABC_ALLOC( int, (((unsigned)1) << p->nPageSize) ); pPage = p->pPages[p->iPage[lrn]]; Sat_MemWriteLimit( pPage, 2 ); } |