mirror of https://github.com/YosysHQ/abc.git
Compiler warnings.
This commit is contained in:
parent
f4a250839d
commit
80f46fa2ae
|
|
@ -120,8 +120,8 @@ static inline int Hop_TruthWordNum( int nVars ) { return nVars
|
|||
static inline int Hop_InfoHasBit( unsigned * p, int i ) { return (p[(i)>>5] & (1<<((i) & 31))) > 0; }
|
||||
static inline void Hop_InfoSetBit( unsigned * p, int i ) { p[(i)>>5] |= (1<<((i) & 31)); }
|
||||
static inline void Hop_InfoXorBit( unsigned * p, int i ) { p[(i)>>5] ^= (1<<((i) & 31)); }
|
||||
static inline int Hop_Base2Log( unsigned n ) { int r; if ( n < 2 ) return n; for ( r = 0, n--; n; n >>= 1, r++ ); return r; }
|
||||
static inline int Hop_Base10Log( unsigned n ) { int r; if ( n < 2 ) return n; for ( r = 0, n--; n; n /= 10, r++ ); return r; }
|
||||
static inline int Hop_Base2Log( unsigned n ) { int r; if ( n < 2 ) return n; for ( r = 0, n--; n; n >>= 1, r++ ) {}; return r; }
|
||||
static inline int Hop_Base10Log( unsigned n ) { int r; if ( n < 2 ) return n; for ( r = 0, n--; n; n /= 10, r++ ) {}; return r; }
|
||||
|
||||
static inline Hop_Obj_t * Hop_Regular( Hop_Obj_t * p ) { return (Hop_Obj_t *)((ABC_PTRUINT_T)(p) & ~01); }
|
||||
static inline Hop_Obj_t * Hop_Not( Hop_Obj_t * p ) { return (Hop_Obj_t *)((ABC_PTRUINT_T)(p) ^ 01); }
|
||||
|
|
|
|||
|
|
@ -1912,7 +1912,7 @@ void Gia_ManGnuplotShow( char * pPlotFileName )
|
|||
void * pAbc;
|
||||
char * pProgNameGnuplotWin = "wgnuplot.exe";
|
||||
char * pProgNameGnuplotUnix = "gnuplot";
|
||||
char * pProgNameGnuplot;
|
||||
char * pProgNameGnuplot = NULL;
|
||||
|
||||
// read in the Capo plotting output
|
||||
if ( (pFile = fopen( pPlotFileName, "r" )) == NULL )
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ unsigned adjustInfoAfterSwap(char* pCanonPerm, unsigned uCanonPhase, int iVar, u
|
|||
|
||||
}
|
||||
|
||||
inline word Extra_Truth6SwapAdjacent( word t, int iVar )
|
||||
word Extra_Truth6SwapAdjacent( word t, int iVar )
|
||||
{
|
||||
// variable swapping code
|
||||
static word PMasks[5][3] = {
|
||||
|
|
@ -83,7 +83,7 @@ inline word Extra_Truth6SwapAdjacent( word t, int iVar )
|
|||
assert( iVar < 5 );
|
||||
return (t & PMasks[iVar][0]) | ((t & PMasks[iVar][1]) << (1 << iVar)) | ((t & PMasks[iVar][2]) >> (1 << iVar));
|
||||
}
|
||||
inline word Extra_Truth6ChangePhase( word t, int iVar)
|
||||
word Extra_Truth6ChangePhase( word t, int iVar)
|
||||
{
|
||||
// elementary truth tables
|
||||
static word Truth6[6] = {
|
||||
|
|
@ -98,7 +98,7 @@ inline word Extra_Truth6ChangePhase( word t, int iVar)
|
|||
return ((t & ~Truth6[iVar]) << (1 << iVar)) | ((t & Truth6[iVar]) >> (1 << iVar));
|
||||
}
|
||||
|
||||
inline word Extra_Truth6MinimumRoundOne( word t, int iVar, char* pCanonPerm, unsigned* pCanonPhase )
|
||||
word Extra_Truth6MinimumRoundOne( word t, int iVar, char* pCanonPerm, unsigned* pCanonPhase )
|
||||
{
|
||||
word tCur, tMin = t; // ab
|
||||
unsigned info =0;
|
||||
|
|
@ -155,7 +155,7 @@ inline word Extra_Truth6MinimumRoundOne( word t, int iVar, char* pCanonPerm, uns
|
|||
}
|
||||
}
|
||||
|
||||
inline word Extra_Truth6MinimumRoundOne_noEBFC( word t, int iVar, char* pCanonPerm, unsigned* pCanonPhase)
|
||||
word Extra_Truth6MinimumRoundOne_noEBFC( word t, int iVar, char* pCanonPerm, unsigned* pCanonPhase)
|
||||
{
|
||||
word tMin;
|
||||
assert( iVar >= 0 && iVar < 5 );
|
||||
|
|
@ -173,7 +173,7 @@ inline word Extra_Truth6MinimumRoundOne_noEBFC( word t, int iVar, char* pCanonP
|
|||
|
||||
// this function finds minimal for all TIED(and tied only) iVars
|
||||
//it finds tied vars based on rearranged Store info - group of tied vars has the same bit count in Store
|
||||
inline word Extra_Truth6MinimumRoundMany( word t, int* pStore, char* pCanonPerm, unsigned* pCanonPhase )
|
||||
word Extra_Truth6MinimumRoundMany( word t, int* pStore, char* pCanonPerm, unsigned* pCanonPhase )
|
||||
{
|
||||
int i, bitInfoTemp;
|
||||
word tMin0, tMin=t;
|
||||
|
|
@ -192,7 +192,7 @@ inline word Extra_Truth6MinimumRoundMany( word t, int* pStore, char* pCanonPerm,
|
|||
return tMin;
|
||||
}
|
||||
|
||||
inline word Extra_Truth6MinimumRoundMany_noEBFC( word t, int* pStore, char* pCanonPerm, unsigned* pCanonPhase )
|
||||
word Extra_Truth6MinimumRoundMany_noEBFC( word t, int* pStore, char* pCanonPerm, unsigned* pCanonPhase )
|
||||
{
|
||||
int i, bitInfoTemp;
|
||||
word tMin0, tMin=t;
|
||||
|
|
@ -210,7 +210,7 @@ inline word Extra_Truth6MinimumRoundMany_noEBFC( word t, int* pStore, char* pCan
|
|||
}while ( tMin0 != tMin );
|
||||
return tMin;
|
||||
}
|
||||
inline word Extra_Truth6MinimumRoundMany1( word t, int* pStore, char* pCanonPerm, unsigned* pCanonPhase )
|
||||
word Extra_Truth6MinimumRoundMany1( word t, int* pStore, char* pCanonPerm, unsigned* pCanonPhase )
|
||||
{
|
||||
word tMin0, tMin=t;
|
||||
char pCanonPerm1[16];
|
||||
|
|
|
|||
|
|
@ -246,9 +246,9 @@ static inline double Abc_MinDouble( double a, double b ) { return a < b ?
|
|||
|
||||
static inline int Abc_Float2Int( float Val ) { union { int x; float y; } v; v.y = Val; return v.x; }
|
||||
static inline float Abc_Int2Float( int Num ) { union { int x; float y; } v; v.x = Num; return v.y; }
|
||||
static inline int Abc_Base2Log( unsigned n ) { int r; if ( n < 2 ) return n; for ( r = 0, n--; n; n >>= 1, r++ ); return r; }
|
||||
static inline int Abc_Base10Log( unsigned n ) { int r; if ( n < 2 ) return n; for ( r = 0, n--; n; n /= 10, r++ ); return r; }
|
||||
static inline int Abc_Base16Log( unsigned n ) { int r; if ( n < 2 ) return n; for ( r = 0, n--; n; n /= 16, r++ ); return r; }
|
||||
static inline int Abc_Base2Log( unsigned n ) { int r; if ( n < 2 ) return n; for ( r = 0, n--; n; n >>= 1, r++ ) {}; return r; }
|
||||
static inline int Abc_Base10Log( unsigned n ) { int r; if ( n < 2 ) return n; for ( r = 0, n--; n; n /= 10, r++ ) {}; return r; }
|
||||
static inline int Abc_Base16Log( unsigned n ) { int r; if ( n < 2 ) return n; for ( r = 0, n--; n; n /= 16, r++ ) {}; return r; }
|
||||
static inline char * Abc_UtilStrsav( char * s ) { return s ? strcpy(ABC_ALLOC(char, strlen(s)+1), s) : NULL; }
|
||||
static inline int Abc_BitWordNum( int nBits ) { return (nBits>>5) + ((nBits&31) > 0); }
|
||||
static inline int Abc_TruthWordNum( int nVars ) { return nVars <= 5 ? 1 : (1 << (nVars - 5)); }
|
||||
|
|
|
|||
|
|
@ -971,8 +971,7 @@ static inline int Vec_WrdEqual( Vec_Wrd_t * p1, Vec_Wrd_t * p2 )
|
|||
|
||||
Synopsis [Counts the number of common entries.]
|
||||
|
||||
Description [Assumes that the entries are non-negative integers that
|
||||
are not very large, so inversion of the array can be performed.]
|
||||
Description []
|
||||
|
||||
SideEffects []
|
||||
|
||||
|
|
@ -988,9 +987,9 @@ static inline int Vec_WrdCountCommon( Vec_Wrd_t * p1, Vec_Wrd_t * p2 )
|
|||
vTemp = p1, p1 = p2, p2 = vTemp;
|
||||
assert( Vec_WrdSize(p1) >= Vec_WrdSize(p2) );
|
||||
vTemp = Vec_WrdInvert( p2, -1 );
|
||||
Vec_WrdFillExtra( vTemp, Vec_WrdFindMax(p1) + 1, -1 );
|
||||
Vec_WrdFillExtra( vTemp, Vec_WrdFindMax(p1) + 1, ~((word)0) );
|
||||
Vec_WrdForEachEntry( p1, Entry, i )
|
||||
if ( Vec_WrdEntry(vTemp, Entry) >= 0 )
|
||||
if ( Vec_WrdEntry(vTemp, Entry) != ~((word)0) )
|
||||
Counter++;
|
||||
Vec_WrdFree( vTemp );
|
||||
return Counter;
|
||||
|
|
|
|||
Loading…
Reference in New Issue