summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2016-12-31 22:00:26 +0700
committerAlan Mishchenko <alanmi@berkeley.edu>2016-12-31 22:00:26 +0700
commit3f2899d6ea1a141f40d7fdfe4556bb349d53c250 (patch)
treef364e1b2a6fd9f257822dfe27e0f41ac8e9c958d /src
parent8eb5d1896a82ef9d1d5e0f25bb6f23e29e9e2ada (diff)
downloadabc-3f2899d6ea1a141f40d7fdfe4556bb349d53c250.tar.gz
abc-3f2899d6ea1a141f40d7fdfe4556bb349d53c250.tar.bz2
abc-3f2899d6ea1a141f40d7fdfe4556bb349d53c250.zip
Compiler warnings.
Diffstat (limited to 'src')
-rw-r--r--src/base/main/mainReal.c4
-rw-r--r--src/map/scl/sclLiberty.c6
-rw-r--r--src/misc/util/utilTruth.h6
-rw-r--r--src/misc/vec/vecPtr.h2
-rw-r--r--src/opt/lpk/lpkCore.c6
-rw-r--r--src/opt/lpk/lpkCut.c6
6 files changed, 15 insertions, 15 deletions
diff --git a/src/base/main/mainReal.c b/src/base/main/mainReal.c
index ee43d38d..31bfef75 100644
--- a/src/base/main/mainReal.c
+++ b/src/base/main/mainReal.c
@@ -196,7 +196,7 @@ int Abc_RealMain( int argc, char * argv[] )
case 't':
if ( TypeCheck( pAbc, globalUtilOptarg ) )
{
- if ( !strcmp(globalUtilOptarg, "none") == 0 )
+ if ( (!strcmp(globalUtilOptarg, "none")) == 0 )
{
fInitRead = 1;
sprintf( sReadCmd, "read_%s", globalUtilOptarg );
@@ -211,7 +211,7 @@ int Abc_RealMain( int argc, char * argv[] )
case 'T':
if ( TypeCheck( pAbc, globalUtilOptarg ) )
{
- if (!strcmp(globalUtilOptarg, "none") == 0)
+ if ( (!strcmp(globalUtilOptarg, "none")) == 0)
{
fFinalWrite = 1;
sprintf( sWriteCmd, "write_%s", globalUtilOptarg);
diff --git a/src/map/scl/sclLiberty.c b/src/map/scl/sclLiberty.c
index 50e69d08..5ecf76bb 100644
--- a/src/map/scl/sclLiberty.c
+++ b/src/map/scl/sclLiberty.c
@@ -509,7 +509,7 @@ char * Scl_LibertyFileContents( char * pFileName, int nContents )
{
FILE * pFile = fopen( pFileName, "rb" );
char * pContents = ABC_ALLOC( char, nContents+1 );
- int RetValue;
+ int RetValue = 0;
RetValue = fread( pContents, nContents, 1, pFile );
fclose( pFile );
pContents[nContents] = 0;
@@ -518,7 +518,7 @@ char * Scl_LibertyFileContents( char * pFileName, int nContents )
void Scl_LibertyStringDump( char * pFileName, Vec_Str_t * vStr )
{
FILE * pFile = fopen( pFileName, "wb" );
- int RetValue;
+ int RetValue = 0;
if ( pFile == NULL )
{
printf( "Scl_LibertyStringDump(): The output file is unavailable.\n" );
@@ -583,7 +583,7 @@ Scl_Tree_t * Scl_LibertyParse( char * pFileName, int fVerbose )
return NULL;
pPos = p->pContents;
Scl_LibertyWipeOutComments( p->pContents, p->pContents+p->nContents );
- if ( !Scl_LibertyBuildItem( p, &pPos, p->pContents + p->nContents ) == 0 )
+ if ( (!Scl_LibertyBuildItem( p, &pPos, p->pContents + p->nContents )) == 0 )
{
if ( p->pError ) printf( "%s", p->pError );
printf( "Parsing failed. " );
diff --git a/src/misc/util/utilTruth.h b/src/misc/util/utilTruth.h
index b8a34da7..d77ed64d 100644
--- a/src/misc/util/utilTruth.h
+++ b/src/misc/util/utilTruth.h
@@ -2612,7 +2612,7 @@ static inline int Abc_TtProcessBiDec( word * pTruth, int nVars, int nSuppLim )
static inline void Abc_TtProcessBiDecTest( word * pTruth, int nVars, int nSuppLim )
{
word This, That, pTemp[64];
- int Res, resThis, resThat, nThis, nThat;
+ int Res, resThis, resThat;//, nThis, nThat;
int nWords = Abc_TtWordNum(nVars);
Abc_TtCopy( pTemp, pTruth, nWords, 0 );
Res = Abc_TtProcessBiDec( pTemp, nVars, nSuppLim );
@@ -2634,8 +2634,8 @@ static inline void Abc_TtProcessBiDecTest( word * pTruth, int nVars, int nSuppLi
// Dau_DsdPrintFromTruth( pTemp, nVars );
- nThis = Abc_TtBitCount16(resThis);
- nThat = Abc_TtBitCount16(resThat);
+ //nThis = Abc_TtBitCount16(resThis);
+ //nThat = Abc_TtBitCount16(resThat);
printf( "Variable sets: " );
Abc_TtPrintVarSet( resThis, nVars );
diff --git a/src/misc/vec/vecPtr.h b/src/misc/vec/vecPtr.h
index 5b40665f..015aa1be 100644
--- a/src/misc/vec/vecPtr.h
+++ b/src/misc/vec/vecPtr.h
@@ -65,7 +65,7 @@ struct Vec_Ptr_t_
#define Vec_PtrForEachEntryTwo( Type1, vVec1, Type2, vVec2, pEntry1, pEntry2, i ) \
for ( i = 0; (i < Vec_PtrSize(vVec1)) && (((pEntry1) = (Type1)Vec_PtrEntry(vVec1, i)), 1) && (((pEntry2) = (Type2)Vec_PtrEntry(vVec2, i)), 1); i++ )
#define Vec_PtrForEachEntryDouble( Type1, Type2, vVec, Entry1, Entry2, i ) \
- for ( i = 0; (i+1 < Vec_IntSize(vVec)) && (((Entry1) = (Type1)Vec_PtrEntry(vVec, i)), 1) && (((Entry2) = (Type2)Vec_PtrEntry(vVec, i+1)), 1); i += 2 )
+ for ( i = 0; (i+1 < Vec_PtrSize(vVec)) && (((Entry1) = (Type1)Vec_PtrEntry(vVec, i)), 1) && (((Entry2) = (Type2)Vec_PtrEntry(vVec, i+1)), 1); i += 2 )
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
diff --git a/src/opt/lpk/lpkCore.c b/src/opt/lpk/lpkCore.c
index a9088d10..6595b365 100644
--- a/src/opt/lpk/lpkCore.c
+++ b/src/opt/lpk/lpkCore.c
@@ -96,12 +96,12 @@ void Lpk_IfManStart( Lpk_Man_t * p )
int Lpk_NodeHasChanged( Lpk_Man_t * p, int iNode )
{
Vec_Ptr_t * vNodes;
- Abc_Obj_t * pTemp;
+ Abc_Obj_t * pTemp, * pTemp2;
int i;
vNodes = Vec_VecEntry( p->vVisited, iNode );
if ( Vec_PtrSize(vNodes) == 0 )
return 1;
- Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pTemp, i )
+ Vec_PtrForEachEntryDouble( Abc_Obj_t *, Abc_Obj_t *, vNodes, pTemp, pTemp2, i )
{
// check if the node has changed
pTemp = Abc_NtkObj( p->pNtk, (int)(ABC_PTRUINT_T)pTemp );
@@ -110,7 +110,7 @@ int Lpk_NodeHasChanged( Lpk_Man_t * p, int iNode )
// check if the number of fanouts has changed
// if ( Abc_ObjFanoutNum(pTemp) != (int)Vec_PtrEntry(vNodes, i+1) )
// return 1;
- i++;
+// i++;
}
return 0;
}
diff --git a/src/opt/lpk/lpkCut.c b/src/opt/lpk/lpkCut.c
index 73711f2b..208facf2 100644
--- a/src/opt/lpk/lpkCut.c
+++ b/src/opt/lpk/lpkCut.c
@@ -234,7 +234,7 @@ void Lpk_NodeRecordImpact( Lpk_Man_t * p )
{
Lpk_Cut_t * pCut;
Vec_Ptr_t * vNodes = Vec_VecEntry( p->vVisited, p->pObj->Id );
- Abc_Obj_t * pNode;
+ Abc_Obj_t * pNode, * pNode2;
int i, k;
// collect the nodes that impact the given node
Vec_PtrClear( vNodes );
@@ -252,11 +252,11 @@ void Lpk_NodeRecordImpact( Lpk_Man_t * p )
}
}
// clear the marks
- Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pNode, i )
+ Vec_PtrForEachEntryDouble( Abc_Obj_t *, Abc_Obj_t *, vNodes, pNode, pNode2, i )
{
pNode = Abc_NtkObj( p->pNtk, (int)(ABC_PTRUINT_T)pNode );
pNode->fMarkC = 0;
- i++;
+// i++;
}
//printf( "%d ", Vec_PtrSize(vNodes) );
}