summaryrefslogtreecommitdiffstats
path: root/src/aig/nwk
diff options
context:
space:
mode:
Diffstat (limited to 'src/aig/nwk')
-rw-r--r--src/aig/nwk/nwkFanio.c2
-rw-r--r--src/aig/nwk/nwkFlow.c2
-rw-r--r--src/aig/nwk/nwkMan.c10
-rw-r--r--src/aig/nwk/nwkSpeedup.c4
-rw-r--r--src/aig/nwk/nwkTiming.c14
-rw-r--r--src/aig/nwk/nwkUtil.c12
6 files changed, 23 insertions, 21 deletions
diff --git a/src/aig/nwk/nwkFanio.c b/src/aig/nwk/nwkFanio.c
index 89bf60ee..4068a1a5 100644
--- a/src/aig/nwk/nwkFanio.c
+++ b/src/aig/nwk/nwkFanio.c
@@ -232,7 +232,7 @@ void Nwk_ObjPatchFanin( Nwk_Obj_t * pObj, Nwk_Obj_t * pFaninOld, Nwk_Obj_t * pFa
if ( iFanin == -1 )
{
printf( "Nwk_ObjPatchFanin(); Error! Node %d is not among", pFaninOld->Id );
- printf( " the fanins of node %s...\n", pObj->Id );
+ printf( " the fanins of node %d...\n", pObj->Id );
return;
}
pObj->pFanio[iFanin] = pFaninNew;
diff --git a/src/aig/nwk/nwkFlow.c b/src/aig/nwk/nwkFlow.c
index 48496158..b6155056 100644
--- a/src/aig/nwk/nwkFlow.c
+++ b/src/aig/nwk/nwkFlow.c
@@ -78,7 +78,7 @@ static inline void Nwk_ObjSetVisitedTop( Nwk_Obj_t * pObj )
else
assert( 0 );
}
-static inline Nwk_ManIncrementTravIdFlow( Nwk_Man_t * pMan )
+static inline void Nwk_ManIncrementTravIdFlow( Nwk_Man_t * pMan )
{
Nwk_ManIncrementTravId( pMan );
Nwk_ManIncrementTravId( pMan );
diff --git a/src/aig/nwk/nwkMan.c b/src/aig/nwk/nwkMan.c
index da402f21..d9a41849 100644
--- a/src/aig/nwk/nwkMan.c
+++ b/src/aig/nwk/nwkMan.c
@@ -140,11 +140,11 @@ int Nwk_ManCompareAndSaveBest( Nwk_Man_t * pNtk, void * pNtl )
ParsNew.nPis = Nwk_ManPiNum( pNtk );
ParsNew.nPos = Nwk_ManPoNum( pNtk );
// reset the parameters if the network has the same name
- if ( ParsBest.pName == NULL ||
- strcmp(ParsBest.pName, pNtk->pName) ||
- ParsBest.Depth > ParsNew.Depth ||
- ParsBest.Depth == ParsNew.Depth && ParsBest.Flops > ParsNew.Flops ||
- ParsBest.Depth == ParsNew.Depth && ParsBest.Flops == ParsNew.Flops && ParsBest.Nodes > ParsNew.Nodes )
+ if ( ParsBest.pName == NULL ||
+ strcmp(ParsBest.pName, pNtk->pName) ||
+ ParsBest.Depth > ParsNew.Depth ||
+ (ParsBest.Depth == ParsNew.Depth && ParsBest.Flops > ParsNew.Flops) ||
+ (ParsBest.Depth == ParsNew.Depth && ParsBest.Flops == ParsNew.Flops && ParsBest.Nodes > ParsNew.Nodes) )
{
FREE( ParsBest.pName );
ParsBest.pName = Aig_UtilStrsav( pNtk->pName );
diff --git a/src/aig/nwk/nwkSpeedup.c b/src/aig/nwk/nwkSpeedup.c
index b7802f72..469e9b71 100644
--- a/src/aig/nwk/nwkSpeedup.c
+++ b/src/aig/nwk/nwkSpeedup.c
@@ -221,8 +221,8 @@ Aig_Man_t * Nwk_ManSpeedup( Nwk_Man_t * pNtk, int fUseLutLib, int Percentage, in
printf( "\n" );
}
// mark the timing critical nodes and edges
- puTCEdges = ALLOC( int, Nwk_ManObjNumMax(pNtk) );
- memset( puTCEdges, 0, sizeof(int) * Nwk_ManObjNumMax(pNtk) );
+ puTCEdges = ALLOC( unsigned, Nwk_ManObjNumMax(pNtk) );
+ memset( puTCEdges, 0, sizeof(unsigned) * Nwk_ManObjNumMax(pNtk) );
Nwk_ManForEachNode( pNtk, pNode, i )
{
if ( Nwk_ObjSlack(pNode) >= tDelta )
diff --git a/src/aig/nwk/nwkTiming.c b/src/aig/nwk/nwkTiming.c
index e8123dae..64508474 100644
--- a/src/aig/nwk/nwkTiming.c
+++ b/src/aig/nwk/nwkTiming.c
@@ -264,7 +264,8 @@ float Nwk_NodePropagateRequired( Nwk_Obj_t * pObj, int fUseSorting )
int pPinPerm[32];
float pPinDelays[32];
Nwk_Obj_t * pFanin;
- float tRequired, * pDelays;
+ float tRequired = 0.0; // Suppress "might be used uninitialized"
+ float * pDelays;
int k;
assert( Nwk_ObjIsNode(pObj) );
if ( pLutLib == NULL )
@@ -557,10 +558,10 @@ void Nwk_NodeUpdateAddToQueue( Vec_Ptr_t * vQueue, Nwk_Obj_t * pObj, int iCurren
***********************************************************************/
void Nwk_NodeUpdateArrival( Nwk_Obj_t * pObj )
{
- If_Lib_t * pLutLib = pObj->pMan->pLutLib;
Tim_Man_t * pManTime = pObj->pMan->pManTime;
Vec_Ptr_t * vQueue = pObj->pMan->vTemp;
- Nwk_Obj_t * pTemp, * pNext;
+ Nwk_Obj_t * pTemp;
+ Nwk_Obj_t * pNext = NULL; // Suppress "might be used uninitialized"
float tArrival;
int iCur, k, iBox, iTerm1, nTerms;
assert( Nwk_ObjIsNode(pObj) );
@@ -636,10 +637,10 @@ void Nwk_NodeUpdateArrival( Nwk_Obj_t * pObj )
***********************************************************************/
void Nwk_NodeUpdateRequired( Nwk_Obj_t * pObj )
{
- If_Lib_t * pLutLib = pObj->pMan->pLutLib;
Tim_Man_t * pManTime = pObj->pMan->pManTime;
Vec_Ptr_t * vQueue = pObj->pMan->vTemp;
- Nwk_Obj_t * pTemp, * pNext;
+ Nwk_Obj_t * pTemp;
+ Nwk_Obj_t * pNext = NULL; // Suppress "might be used uninitialized"
float tRequired;
int iCur, k, iBox, iTerm1, nTerms;
assert( Nwk_ObjIsNode(pObj) );
@@ -763,7 +764,8 @@ void Nwk_ManUpdateLevel( Nwk_Obj_t * pObj )
{
Tim_Man_t * pManTime = pObj->pMan->pManTime;
Vec_Ptr_t * vQueue = pObj->pMan->vTemp;
- Nwk_Obj_t * pTemp, * pNext;
+ Nwk_Obj_t * pTemp;
+ Nwk_Obj_t * pNext = NULL; // Suppress "might be used uninitialized"
int LevelNew, iCur, k, iBox, iTerm1, nTerms;
assert( Nwk_ObjIsNode(pObj) );
// initialize the queue with the node
diff --git a/src/aig/nwk/nwkUtil.c b/src/aig/nwk/nwkUtil.c
index 14f7632f..d6daca4e 100644
--- a/src/aig/nwk/nwkUtil.c
+++ b/src/aig/nwk/nwkUtil.c
@@ -261,7 +261,7 @@ void Nwk_ManDumpBlif( Nwk_Man_t * pNtk, char * pFileName, Vec_Ptr_t * vPiNames,
Aig_MmFlex_t * pMem;
char * pSop = NULL;
unsigned * pTruth;
- int i, k, nDigits, Counter = 0;
+ int i, k, nDigits;
if ( Nwk_ManPoNum(pNtk) == 0 )
{
printf( "Nwk_ManDumpBlif(): Network does not have POs.\n" );
@@ -278,7 +278,7 @@ void Nwk_ManDumpBlif( Nwk_Man_t * pNtk, char * pFileName, Vec_Ptr_t * vPiNames,
fprintf( pFile, ".inputs" );
Nwk_ManForEachCi( pNtk, pObj, i )
if ( vPiNames )
- fprintf( pFile, " %s", Vec_PtrEntry(vPiNames, i) );
+ fprintf( pFile, " %s", (char*)Vec_PtrEntry(vPiNames, i) );
else
fprintf( pFile, " n%0*d", nDigits, pObj->Id );
fprintf( pFile, "\n" );
@@ -286,7 +286,7 @@ void Nwk_ManDumpBlif( Nwk_Man_t * pNtk, char * pFileName, Vec_Ptr_t * vPiNames,
fprintf( pFile, ".outputs" );
Nwk_ManForEachCo( pNtk, pObj, i )
if ( vPoNames )
- fprintf( pFile, " %s", Vec_PtrEntry(vPoNames, i) );
+ fprintf( pFile, " %s", (char*)Vec_PtrEntry(vPoNames, i) );
else
fprintf( pFile, " n%0*d", nDigits, pObj->Id );
fprintf( pFile, "\n" );
@@ -310,7 +310,7 @@ void Nwk_ManDumpBlif( Nwk_Man_t * pNtk, char * pFileName, Vec_Ptr_t * vPiNames,
{
Nwk_ObjForEachFanin( pObj, pFanin, k )
if ( vPiNames && Nwk_ObjIsPi(pFanin) )
- fprintf( pFile, " %s", Vec_PtrEntry(vPiNames, Nwk_ObjPioNum(pFanin)) );
+ fprintf( pFile, " %s", (char*)Vec_PtrEntry(vPiNames, Nwk_ObjPioNum(pFanin)) );
else
fprintf( pFile, " n%0*d", nDigits, pFanin->Id );
}
@@ -327,11 +327,11 @@ void Nwk_ManDumpBlif( Nwk_Man_t * pNtk, char * pFileName, Vec_Ptr_t * vPiNames,
{
fprintf( pFile, ".names" );
if ( vPiNames && Nwk_ObjIsPi(Nwk_ObjFanin0(pObj)) )
- fprintf( pFile, " %s", Vec_PtrEntry(vPiNames, Nwk_ObjPioNum(Nwk_ObjFanin0(pObj))) );
+ fprintf( pFile, " %s", (char*)Vec_PtrEntry(vPiNames, Nwk_ObjPioNum(Nwk_ObjFanin0(pObj))) );
else
fprintf( pFile, " n%0*d", nDigits, Nwk_ObjFanin0(pObj)->Id );
if ( vPoNames )
- fprintf( pFile, " %s\n", Vec_PtrEntry(vPoNames, Nwk_ObjPioNum(pObj)) );
+ fprintf( pFile, " %s\n", (char*)Vec_PtrEntry(vPoNames, Nwk_ObjPioNum(pObj)) );
else
fprintf( pFile, " n%0*d\n", nDigits, pObj->Id );
fprintf( pFile, "%d 1\n", !pObj->fInvert );