summaryrefslogtreecommitdiffstats
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/fpga/fpga.c2
-rw-r--r--src/map/fpga/fpgaCreate.c6
-rw-r--r--src/map/fpga/fpgaCut.c16
-rw-r--r--src/map/fpga/fpgaCutUtils.c15
-rw-r--r--src/map/fpga/fpgaInt.h24
-rw-r--r--src/map/fpga/fpgaLib.c4
-rw-r--r--src/map/fpga/fpgaMatch.c10
-rw-r--r--src/map/fpga/fpgaTime.c4
-rw-r--r--src/map/fpga/fpgaTruth.c8
-rw-r--r--src/map/fpga/fpgaUtils.c7
-rw-r--r--src/map/fpga/fpgaVec.c4
-rw-r--r--src/map/if/if.h2
-rw-r--r--src/map/if/ifLib.c4
-rw-r--r--src/map/if/ifMan.c2
-rw-r--r--src/map/mapper/mapper.c2
-rw-r--r--src/map/mapper/mapperCanon.c5
-rw-r--r--src/map/mapper/mapperCreate.c2
-rw-r--r--src/map/mapper/mapperCut.c16
-rw-r--r--src/map/mapper/mapperCutUtils.c3
-rw-r--r--src/map/mapper/mapperLib.c5
-rw-r--r--src/map/mapper/mapperMatch.c3
-rw-r--r--src/map/mapper/mapperSuper.c5
-rw-r--r--src/map/mapper/mapperTable.c2
-rw-r--r--src/map/mapper/mapperTree.c2
-rw-r--r--src/map/mapper/mapperTruth.c2
-rw-r--r--src/map/mapper/mapperUtils.c1
-rw-r--r--src/map/mio/mio.c6
-rw-r--r--src/map/mio/mioRead.c5
-rw-r--r--src/map/super/superAnd.c16
-rw-r--r--src/map/super/superGate.c7
30 files changed, 101 insertions, 89 deletions
diff --git a/src/map/fpga/fpga.c b/src/map/fpga/fpga.c
index 31edf689..fa2a138c 100644
--- a/src/map/fpga/fpga.c
+++ b/src/map/fpga/fpga.c
@@ -138,7 +138,7 @@ int Fpga_CommandReadLibrary( Abc_Frame_t * pAbc, int argc, char **argv )
if ( (pFile = fopen( FileName, "r" )) == NULL )
{
fprintf( pErr, "Cannot open input file \"%s\". ", FileName );
- if ( FileName = Extra_FileGetSimilarName( FileName, ".genlib", ".lib", ".gen", ".g", NULL ) )
+ if ( (FileName = Extra_FileGetSimilarName( FileName, ".genlib", ".lib", ".gen", ".g", NULL )) )
fprintf( pErr, "Did you mean \"%s\"?", FileName );
fprintf( pErr, "\n" );
return 1;
diff --git a/src/map/fpga/fpgaCreate.c b/src/map/fpga/fpgaCreate.c
index be71d74e..c0bae1c7 100644
--- a/src/map/fpga/fpgaCreate.c
+++ b/src/map/fpga/fpgaCreate.c
@@ -28,7 +28,7 @@ static void Fpga_TableResize( Fpga_Man_t * p );
static Fpga_Node_t * Fpga_TableLookup( Fpga_Man_t * p, Fpga_Node_t * p1, Fpga_Node_t * p2 );
// hash key for the structural hash table
-static inline unsigned Fpga_HashKey2( Fpga_Node_t * p0, Fpga_Node_t * p1, int TableSize ) { return ((unsigned)(p0) + (unsigned)(p1) * 12582917) % TableSize; }
+static inline unsigned Fpga_HashKey2( Fpga_Node_t * p0, Fpga_Node_t * p1, int TableSize ) { return (unsigned)(((PORT_PTRUINT_T)(p0) + (PORT_PTRUINT_T)(p1) * 12582917) % TableSize); }
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
@@ -252,8 +252,8 @@ void Fpga_ManFree( Fpga_Man_t * p )
***********************************************************************/
void Fpga_ManPrintTimeStats( Fpga_Man_t * p )
{
- extern char * pNetName;
- extern int TotalLuts;
+// extern char * pNetName;
+// extern int TotalLuts;
// FILE * pTable;
diff --git a/src/map/fpga/fpgaCut.c b/src/map/fpga/fpgaCut.c
index ce688179..de558456 100644
--- a/src/map/fpga/fpgaCut.c
+++ b/src/map/fpga/fpgaCut.c
@@ -418,8 +418,8 @@ Fpga_Cut_t * Fpga_CutMergeLists( Fpga_Man_t * p, Fpga_CutTable_t * pTable,
// create the signature
pCut->uSign = pTemp1->uSign | pTemp2->uSign;
// add it to the corresponding list
- pCut->pNext = pLists[pCut->nLeaves];
- pLists[pCut->nLeaves] = pCut;
+ pCut->pNext = pLists[(int)pCut->nLeaves];
+ pLists[(int)pCut->nLeaves] = pCut;
// count this cut and quit if limit is reached
Counter++;
if ( Counter == FPGA_CUTS_MAX_COMPUTE )
@@ -453,8 +453,8 @@ Fpga_Cut_t * Fpga_CutMergeLists( Fpga_Man_t * p, Fpga_CutTable_t * pTable,
// create the signature
pCut->uSign = pTemp1->uSign | pTemp2->uSign;
// add it to the corresponding list
- pCut->pNext = pLists[pCut->nLeaves];
- pLists[pCut->nLeaves] = pCut;
+ pCut->pNext = pLists[(int)pCut->nLeaves];
+ pLists[(int)pCut->nLeaves] = pCut;
// count this cut and quit if limit is reached
Counter++;
if ( Counter == FPGA_CUTS_MAX_COMPUTE )
@@ -493,8 +493,8 @@ Fpga_Cut_t * Fpga_CutMergeLists( Fpga_Man_t * p, Fpga_CutTable_t * pTable,
// create the signature
pCut->uSign = pTemp1->uSign | pTemp2->uSign;
// add it to the corresponding list
- pCut->pNext = pLists[pCut->nLeaves];
- pLists[pCut->nLeaves] = pCut;
+ pCut->pNext = pLists[(int)pCut->nLeaves];
+ pLists[(int)pCut->nLeaves] = pCut;
// count this cut and quit if limit is reached
Counter++;
if ( Counter == FPGA_CUTS_MAX_COMPUTE )
@@ -560,8 +560,8 @@ Fpga_Cut_t * Fpga_CutMergeLists2( Fpga_Man_t * p, Fpga_CutTable_t * pTable,
pCut->pOne = Fpga_CutNotCond( pTemp1, fComp1 );
pCut->pTwo = Fpga_CutNotCond( pTemp2, fComp2 );
// add it to the corresponding list
- pCut->pNext = pLists[pCut->nLeaves];
- pLists[pCut->nLeaves] = pCut;
+ pCut->pNext = pLists[(int)pCut->nLeaves];
+ pLists[(int)pCut->nLeaves] = pCut;
// count this cut and quit if limit is reached
Counter++;
if ( Counter == FPGA_CUTS_MAX_COMPUTE )
diff --git a/src/map/fpga/fpgaCutUtils.c b/src/map/fpga/fpgaCutUtils.c
index e60a1dee..0f003ee7 100644
--- a/src/map/fpga/fpgaCutUtils.c
+++ b/src/map/fpga/fpgaCutUtils.c
@@ -142,7 +142,7 @@ Fpga_Cut_t * Fpga_CutCreateSimple( Fpga_Man_t * p, Fpga_Node_t * pNode )
***********************************************************************/
float Fpga_CutGetRootArea( Fpga_Man_t * p, Fpga_Cut_t * pCut )
{
- return p->pLutLib->pLutAreas[pCut->nLeaves];
+ return p->pLutLib->pLutAreas[(int)pCut->nLeaves];
}
/**Function*************************************************************
@@ -158,7 +158,8 @@ float Fpga_CutGetRootArea( Fpga_Man_t * p, Fpga_Cut_t * pCut )
***********************************************************************/
Fpga_Cut_t * Fpga_CutListAppend( Fpga_Cut_t * pSetAll, Fpga_Cut_t * pSets )
{
- Fpga_Cut_t * pPrev, * pTemp;
+ Fpga_Cut_t * pPrev = NULL; // Suppress "might be used uninitialized"
+ Fpga_Cut_t * pTemp;
if ( pSetAll == NULL )
return pSets;
if ( pSets == NULL )
@@ -277,7 +278,7 @@ void Fpga_CutGetParameters( Fpga_Man_t * pMan, Fpga_Cut_t * pCut )
Fpga_Cut_t * pFaninCut;
int i;
pCut->tArrival = -FPGA_FLOAT_LARGE;
- pCut->aFlow = pMan->pLutLib->pLutAreas[pCut->nLeaves];
+ pCut->aFlow = pMan->pLutLib->pLutAreas[(int)pCut->nLeaves];
for ( i = 0; i < pCut->nLeaves; i++ )
{
pFaninCut = pCut->ppLeaves[i]->pCutBest;
@@ -292,7 +293,7 @@ void Fpga_CutGetParameters( Fpga_Man_t * pMan, Fpga_Cut_t * pCut )
}
// use the first pin to compute the delay of the LUT
// (this mapper does not support the variable pin delay model)
- pCut->tArrival += pMan->pLutLib->pLutDelays[pCut->nLeaves][0];
+ pCut->tArrival += pMan->pLutLib->pLutDelays[(int)pCut->nLeaves][0];
}
@@ -311,7 +312,7 @@ float Fpga_CutGetAreaFlow( Fpga_Man_t * pMan, Fpga_Cut_t * pCut )
{
Fpga_Cut_t * pCutFanin;
int i;
- pCut->aFlow = pMan->pLutLib->pLutAreas[pCut->nLeaves];
+ pCut->aFlow = pMan->pLutLib->pLutAreas[(int)pCut->nLeaves];
for ( i = 0; i < pCut->nLeaves; i++ )
{
// get the cut implementing this phase of the fanin
@@ -388,7 +389,7 @@ float Fpga_CutRef( Fpga_Man_t * pMan, Fpga_Node_t * pNode, Fpga_Cut_t * pCut, in
// Fpga_CutInsertFanouts( pMan, pNode, pCut );
// start the area of this cut
- aArea = pMan->pLutLib->pLutAreas[pCut->nLeaves];
+ aArea = pMan->pLutLib->pLutAreas[(int)pCut->nLeaves];
// go through the children
for ( i = 0; i < pCut->nLeaves; i++ )
{
@@ -425,7 +426,7 @@ float Fpga_CutDeref( Fpga_Man_t * pMan, Fpga_Node_t * pNode, Fpga_Cut_t * pCut,
// Fpga_CutRemoveFanouts( pMan, pNode, pCut );
// start the area of this cut
- aArea = pMan->pLutLib->pLutAreas[pCut->nLeaves];
+ aArea = pMan->pLutLib->pLutAreas[(int)pCut->nLeaves];
// go through the children
for ( i = 0; i < pCut->nLeaves; i++ )
{
diff --git a/src/map/fpga/fpgaInt.h b/src/map/fpga/fpgaInt.h
index 1e4ac1d4..a308cbb3 100644
--- a/src/map/fpga/fpgaInt.h
+++ b/src/map/fpga/fpgaInt.h
@@ -64,19 +64,19 @@
#define FPGA_INT_LARGE (10000000)
// the macro to compute the signature
-#define FPGA_SEQ_SIGN(p) (1 << (((unsigned)p)%31));
+#define FPGA_SEQ_SIGN(p) (1 << (((PORT_PTRUINT_T)p)%31));
// internal macros to work with cuts
-#define Fpga_CutIsComplement(p) (((int)((unsigned long) (p) & 01)))
-#define Fpga_CutRegular(p) ((Fpga_Cut_t *)((unsigned long)(p) & ~01))
-#define Fpga_CutNot(p) ((Fpga_Cut_t *)((unsigned long)(p) ^ 01))
-#define Fpga_CutNotCond(p,c) ((Fpga_Cut_t *)((unsigned long)(p) ^ (c)))
+#define Fpga_CutIsComplement(p) (((int)((PORT_PTRUINT_T)(p) & 01)))
+#define Fpga_CutRegular(p) ((Fpga_Cut_t *)((PORT_PTRUINT_T)(p) & ~01))
+#define Fpga_CutNot(p) ((Fpga_Cut_t *)((PORT_PTRUINT_T)(p) ^ 01))
+#define Fpga_CutNotCond(p,c) ((Fpga_Cut_t *)((PORT_PTRUINT_T)(p) ^ (c)))
// the cut nodes
-#define Fpga_SeqIsComplement( p ) (((int)((unsigned long) (p) & 01)))
-#define Fpga_SeqRegular( p ) ((Fpga_Node_t *)((unsigned long)(p) & ~015))
-#define Fpga_SeqIndex( p ) ((((unsigned long)(p)) >> 1) & 07)
-#define Fpga_SeqIndexCreate( p, Ind ) (((unsigned long)(p)) | (1 << (((unsigned)(Ind)) & 07)))
+#define Fpga_SeqIsComplement( p ) (((int)((PORT_PTRUINT_T) (p) & 01)))
+#define Fpga_SeqRegular( p ) ((Fpga_Node_t *)((PORT_PTRUINT_T)(p) & ~015))
+#define Fpga_SeqIndex( p ) ((((PORT_PTRUINT_T)(p)) >> 1) & 07)
+#define Fpga_SeqIndexCreate( p, Ind ) (((PORT_PTRUINT_T)(p)) | (1 << (((PORT_PTRUINT_T)(Ind)) & 07)))
// internal macros for referencing of nodes
#define Fpga_NodeReadRef(p) ((Fpga_Regular(p))->nRefs)
@@ -275,9 +275,9 @@ struct Fpga_NodeVecStruct_t_
pFanout = pFanout2, \
pFanout2 = Fpga_NodeReadNextFanout(pNode, pFanout) )
-static inline Fpga_FloatMoreThan( Fpga_Man_t * p, float Arg1, float Arg2 ) { return Arg1 > Arg2 + p->fEpsilon; }
-static inline Fpga_FloatLessThan( Fpga_Man_t * p, float Arg1, float Arg2 ) { return Arg1 < Arg2 - p->fEpsilon; }
-static inline Fpga_FloatEqual( Fpga_Man_t * p, float Arg1, float Arg2 ) { return Arg1 > Arg2 - p->fEpsilon && Arg1 < Arg2 + p->fEpsilon; }
+static inline int Fpga_FloatMoreThan( Fpga_Man_t * p, float Arg1, float Arg2 ) { return Arg1 > Arg2 + p->fEpsilon; }
+static inline int Fpga_FloatLessThan( Fpga_Man_t * p, float Arg1, float Arg2 ) { return Arg1 < Arg2 - p->fEpsilon; }
+static inline int Fpga_FloatEqual( Fpga_Man_t * p, float Arg1, float Arg2 ) { return Arg1 > Arg2 - p->fEpsilon && Arg1 < Arg2 + p->fEpsilon; }
////////////////////////////////////////////////////////////////////////
/// GLOBAL VARIABLES ///
diff --git a/src/map/fpga/fpgaLib.c b/src/map/fpga/fpgaLib.c
index 77fc3a6f..b9615a8c 100644
--- a/src/map/fpga/fpgaLib.c
+++ b/src/map/fpga/fpgaLib.c
@@ -91,7 +91,7 @@ Fpga_LutLib_t * Fpga_LutLibRead( char * FileName, int fVerbose )
// read delays
k = 0;
- while ( pToken = strtok( NULL, " \t\n" ) )
+ while ( (pToken = strtok( NULL, " \t\n" )) )
p->pLutDelays[i][k++] = (float)atof(pToken);
// check for out-of-bound
@@ -141,7 +141,7 @@ Fpga_LutLib_t * Fpga_LutLibRead( char * FileName, int fVerbose )
{
if ( p->pLutDelays[i][0] <= 0.0 )
printf( "Warning: LUT %d has delay %f. Pin delays should be non-negative numbers. Technology mapping may not work correctly.\n",
- k, i, p->pLutDelays[i][0] );
+ i, p->pLutDelays[i][0] );
}
}
diff --git a/src/map/fpga/fpgaMatch.c b/src/map/fpga/fpgaMatch.c
index 73fa1258..30448750 100644
--- a/src/map/fpga/fpgaMatch.c
+++ b/src/map/fpga/fpgaMatch.c
@@ -153,10 +153,10 @@ clk = clock();
// (2) area recovery (subsequent traversals), area-flow first, delay as a tie-breaker
if ( (fDelayOriented &&
(Fpga_FloatMoreThan(p, pNode->pCutBest->tArrival, pCut->tArrival) ||
- Fpga_FloatEqual(p, pNode->pCutBest->tArrival, pCut->tArrival) && Fpga_FloatMoreThan(p, pNode->pCutBest->aFlow, pCut->aFlow) )) ||
+ (Fpga_FloatEqual(p, pNode->pCutBest->tArrival, pCut->tArrival) && Fpga_FloatMoreThan(p, pNode->pCutBest->aFlow, pCut->aFlow)) )) ||
(!fDelayOriented &&
(Fpga_FloatMoreThan(p, pNode->pCutBest->aFlow, pCut->aFlow) ||
- Fpga_FloatEqual(p, pNode->pCutBest->aFlow, pCut->aFlow) && Fpga_FloatMoreThan(p, pNode->pCutBest->tArrival, pCut->tArrival))) )
+ (Fpga_FloatEqual(p, pNode->pCutBest->aFlow, pCut->aFlow) && Fpga_FloatMoreThan(p, pNode->pCutBest->tArrival, pCut->tArrival)))) )
{
pNode->pCutBest = pCut;
}
@@ -301,7 +301,7 @@ clk = clock();
}
// choose the best cut as follows: exact area first, delay as a tie-breaker
if ( Fpga_FloatMoreThan(p, pNode->pCutBest->aFlow, pCut->aFlow) ||
- Fpga_FloatEqual(p, pNode->pCutBest->aFlow, pCut->aFlow) && Fpga_FloatMoreThan(p, pNode->pCutBest->tArrival, pCut->tArrival) )
+ (Fpga_FloatEqual(p, pNode->pCutBest->aFlow, pCut->aFlow) && Fpga_FloatMoreThan(p, pNode->pCutBest->tArrival, pCut->tArrival)) )
{
pNode->pCutBest = pCut;
}
@@ -386,7 +386,7 @@ int Fpga_MappingMatchesSwitch( Fpga_Man_t * p )
int Fpga_MatchNodeSwitch( Fpga_Man_t * p, Fpga_Node_t * pNode )
{
Fpga_Cut_t * pCut, * pCutBestOld;
- float aAreaCutBest;
+ float aAreaCutBest = FPGA_FLOAT_LARGE;
int clk;
// make sure that at least one cut other than the trivial is present
if ( pNode->pCuts->pNext == NULL )
@@ -422,7 +422,7 @@ clk = clock();
}
// choose the best cut as follows: exact area first, delay as a tie-breaker
if ( Fpga_FloatMoreThan(p, pNode->pCutBest->aFlow, pCut->aFlow) ||
- Fpga_FloatEqual(p, pNode->pCutBest->aFlow, pCut->aFlow) && Fpga_FloatMoreThan(p, pNode->pCutBest->tArrival, pCut->tArrival) )
+ (Fpga_FloatEqual(p, pNode->pCutBest->aFlow, pCut->aFlow) && Fpga_FloatMoreThan(p, pNode->pCutBest->tArrival, pCut->tArrival)) )
{
pNode->pCutBest = pCut;
}
diff --git a/src/map/fpga/fpgaTime.c b/src/map/fpga/fpgaTime.c
index 879cad4d..d9bf7947 100644
--- a/src/map/fpga/fpgaTime.c
+++ b/src/map/fpga/fpgaTime.c
@@ -46,7 +46,7 @@ float Fpga_TimeCutComputeArrival( Fpga_Man_t * pMan, Fpga_Cut_t * pCut )
for ( i = 0; i < pCut->nLeaves; i++ )
if ( tArrival < pCut->ppLeaves[i]->pCutBest->tArrival )
tArrival = pCut->ppLeaves[i]->pCutBest->tArrival;
- tArrival += pMan->pLutLib->pLutDelays[pCut->nLeaves][0];
+ tArrival += pMan->pLutLib->pLutDelays[(int)pCut->nLeaves][0];
return tArrival;
}
@@ -216,7 +216,7 @@ void Fpga_TimePropagateRequired( Fpga_Man_t * p, Fpga_NodeVec_t * vNodes )
if ( !Fpga_NodeIsAnd(pNode) )
continue;
// get the required time for children
- fRequired = pNode->tRequired - p->pLutLib->pLutDelays[pNode->pCutBest->nLeaves][0];
+ fRequired = pNode->tRequired - p->pLutLib->pLutDelays[(int)pNode->pCutBest->nLeaves][0];
// update the required time of the children
for ( i = 0; i < pNode->pCutBest->nLeaves; i++ )
{
diff --git a/src/map/fpga/fpgaTruth.c b/src/map/fpga/fpgaTruth.c
index e3eb487f..8ffb7819 100644
--- a/src/map/fpga/fpgaTruth.c
+++ b/src/map/fpga/fpgaTruth.c
@@ -44,7 +44,7 @@ DdNode * Fpga_TruthsCutBdd_rec( DdManager * dd, Fpga_Cut_t * pCut, Fpga_NodeVec_
assert( !Fpga_IsComplement(pCut) );
// if the cut is visited, return the result
if ( pCut->uSign )
- return (DdNode *)pCut->uSign;
+ return (DdNode *)(PORT_PTRUINT_T)pCut->uSign;
// compute the functions of the children
bFunc0 = Fpga_TruthsCutBdd_rec( dd, Fpga_CutRegular(pCut->pOne), vVisited ); Cudd_Ref( bFunc0 );
bFunc0 = Cudd_NotCond( bFunc0, Fpga_CutIsComplement(pCut->pOne) );
@@ -56,7 +56,7 @@ DdNode * Fpga_TruthsCutBdd_rec( DdManager * dd, Fpga_Cut_t * pCut, Fpga_NodeVec_
Cudd_RecursiveDeref( dd, bFunc0 );
Cudd_RecursiveDeref( dd, bFunc1 );
assert( pCut->uSign == 0 );
- pCut->uSign = (unsigned)bFunc;
+ pCut->uSign = (unsigned)(PORT_PTRUINT_T)bFunc;
// add this cut to the visited list
Fpga_NodeVecPush( vVisited, (Fpga_Node_t *)pCut );
return bFunc;
@@ -81,7 +81,7 @@ void * Fpga_TruthsCutBdd( void * dd, Fpga_Cut_t * pCut )
assert( pCut->nLeaves > 1 );
// set the leaf variables
for ( i = 0; i < pCut->nLeaves; i++ )
- pCut->ppLeaves[i]->pCuts->uSign = (unsigned)Cudd_bddIthVar( dd, i );
+ pCut->ppLeaves[i]->pCuts->uSign = (unsigned)(PORT_PTRUINT_T)Cudd_bddIthVar( dd, i );
// recursively compute the function
vVisited = Fpga_NodeVecAlloc( 10 );
bFunc = Fpga_TruthsCutBdd_rec( dd, pCut, vVisited ); Cudd_Ref( bFunc );
@@ -91,7 +91,7 @@ void * Fpga_TruthsCutBdd( void * dd, Fpga_Cut_t * pCut )
for ( i = 0; i < vVisited->nSize; i++ )
{
pCut = (Fpga_Cut_t *)vVisited->pArray[i];
- Cudd_RecursiveDeref( dd, (DdNode*)pCut->uSign );
+ Cudd_RecursiveDeref( dd, (DdNode*)(PORT_PTRUINT_T)pCut->uSign );
pCut->uSign = 0;
}
// printf( "%d ", vVisited->nSize );
diff --git a/src/map/fpga/fpgaUtils.c b/src/map/fpga/fpgaUtils.c
index b951fd8f..77c2e2b0 100644
--- a/src/map/fpga/fpgaUtils.c
+++ b/src/map/fpga/fpgaUtils.c
@@ -31,7 +31,6 @@ static void Fpga_MappingFindLatest( Fpga_Man_t * p, int * pNodes, int nNodesMax
static void Fpga_DfsLim_rec( Fpga_Node_t * pNode, int Level, Fpga_NodeVec_t * vNodes );
static int Fpga_CollectNodeTfo_rec( Fpga_Node_t * pNode, Fpga_Node_t * pPivot, Fpga_NodeVec_t * vVisited, Fpga_NodeVec_t * vTfo );
static Fpga_NodeVec_t * Fpga_MappingOrderCosByLevel( Fpga_Man_t * pMan );
-static Fpga_Man_t * s_pMan = NULL;
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
@@ -182,7 +181,7 @@ float Fpga_MappingArea( Fpga_Man_t * pMan )
for ( i = 0; i < pMan->vMapping->nSize; i++ )
{
pNode = pMan->vMapping->pArray[i];
- aTotal += pMan->pLutLib->pLutAreas[pNode->pCutBest->nLeaves];
+ aTotal += pMan->pLutLib->pLutAreas[(int)pNode->pCutBest->nLeaves];
}
return aTotal;
}
@@ -217,7 +216,7 @@ float Fpga_MappingArea_rec( Fpga_Man_t * pMan, Fpga_Node_t * pNode, Fpga_NodeVec
// mark the node as visited
pNode->fMark0 = 1;
// add the node to the list
- aArea += pMan->pLutLib->pLutAreas[pNode->pCutBest->nLeaves];
+ aArea += pMan->pLutLib->pLutAreas[(int)pNode->pCutBest->nLeaves];
// add the node to the list
Fpga_NodeVecPush( vNodes, pNode );
return aArea;
@@ -276,7 +275,7 @@ float Fpga_MappingSetRefsAndArea_rec( Fpga_Man_t * pMan, Fpga_Node_t * pNode, Fp
pNode->pData0 = (char *)ppStore[pNode->Level];
ppStore[pNode->Level] = pNode;
// visit the transitive fanin of the selected cut
- aArea = pMan->pLutLib->pLutAreas[pNode->pCutBest->nLeaves];
+ aArea = pMan->pLutLib->pLutAreas[(int)pNode->pCutBest->nLeaves];
for ( i = 0; i < pNode->pCutBest->nLeaves; i++ )
aArea += Fpga_MappingSetRefsAndArea_rec( pMan, pNode->pCutBest->ppLeaves[i], ppStore );
return aArea;
diff --git a/src/map/fpga/fpgaVec.c b/src/map/fpga/fpgaVec.c
index 70a4a7ac..79b6b43d 100644
--- a/src/map/fpga/fpgaVec.c
+++ b/src/map/fpga/fpgaVec.c
@@ -370,8 +370,8 @@ void Fpga_NodeVecPushOrder( Fpga_NodeVec_t * vNodes, Fpga_Node_t * pNode, int fI
{
pNode1 = vNodes->pArray[i ];
pNode2 = vNodes->pArray[i-1];
- if ( fIncreasing && pNode1->pCutBest->tArrival >= pNode2->pCutBest->tArrival ||
- !fIncreasing && pNode1->pCutBest->tArrival <= pNode2->pCutBest->tArrival )
+ if (( fIncreasing && pNode1->pCutBest->tArrival >= pNode2->pCutBest->tArrival) ||
+ (!fIncreasing && pNode1->pCutBest->tArrival <= pNode2->pCutBest->tArrival) )
break;
vNodes->pArray[i ] = pNode2;
vNodes->pArray[i-1] = pNode1;
diff --git a/src/map/if/if.h b/src/map/if/if.h
index 8cf5c0e8..24046f06 100644
--- a/src/map/if/if.h
+++ b/src/map/if/if.h
@@ -326,7 +326,7 @@ static inline float If_CutLutArea( If_Man_t * p, If_Cut_t * pCut ) { r
for ( i = 0; (i < (int)(pCut)->nLeaves) && ((pLeaf) = If_ManObj(p, (pCut)->pLeaves[i])); i++ )
#define If_CutForEachLeafReverse( p, pCut, pLeaf, i ) \
for ( i = (int)(pCut)->nLeaves - 1; (i >= 0) && ((pLeaf) = If_ManObj(p, (pCut)->pLeaves[i])); i-- )
-//#define If_CutForEachLeaf( p, pCut, pLeaf, i ) \
+//#define If_CutForEachLeaf( p, pCut, pLeaf, i ) \ \\prevent multiline comment
// for ( i = 0; (i < (int)(pCut)->nLeaves) && ((pLeaf) = If_ManObj(p, p->pPars->fLiftLeaves? (pCut)->pLeaves[i] >> 8 : (pCut)->pLeaves[i])); i++ )
// iterator over the leaves of the sequential cut
#define If_CutForEachLeafSeq( p, pCut, pLeaf, Shift, i ) \
diff --git a/src/map/if/ifLib.c b/src/map/if/ifLib.c
index b3e6ad4c..51630164 100644
--- a/src/map/if/ifLib.c
+++ b/src/map/if/ifLib.c
@@ -80,7 +80,7 @@ If_Lib_t * If_LutLibRead( char * FileName )
// read delays
k = 0;
- while ( pToken = strtok( NULL, " \t\n" ) )
+ while ( (pToken = strtok( NULL, " \t\n" )) )
p->pLutDelays[i][k++] = (float)atof(pToken);
// check for out-of-bound
@@ -124,7 +124,7 @@ If_Lib_t * If_LutLibRead( char * FileName )
{
if ( p->pLutDelays[i][0] <= 0.0 )
printf( "Warning: LUT %d has delay %f. Pin delays should be non-negative numbers. Technology mapping may not work correctly.\n",
- k, i, p->pLutDelays[i][0] );
+ i, p->pLutDelays[i][0] );
}
}
diff --git a/src/map/if/ifMan.c b/src/map/if/ifMan.c
index d1a17b6a..015e3d31 100644
--- a/src/map/if/ifMan.c
+++ b/src/map/if/ifMan.c
@@ -320,7 +320,7 @@ void If_ManSetupCut( If_Man_t * p, If_Cut_t * pCut )
if ( p->pPars->fUsePerm )
pCut->pPerm = (char *)(pCut->pLeaves + p->pPars->nLutSize);
if ( p->pPars->fTruth )
- pCut->pTruth = pCut->pLeaves + p->pPars->nLutSize + p->nPermWords;
+ pCut->pTruth = (unsigned *)pCut->pLeaves + p->pPars->nLutSize + p->nPermWords;
}
/**Function*************************************************************
diff --git a/src/map/mapper/mapper.c b/src/map/mapper/mapper.c
index b18b68c0..37052100 100644
--- a/src/map/mapper/mapper.c
+++ b/src/map/mapper/mapper.c
@@ -132,7 +132,7 @@ int Map_CommandReadLibrary( Abc_Frame_t * pAbc, int argc, char **argv )
// if ( (pFile = fopen( FileName, "r" )) == NULL )
{
fprintf( pErr, "Cannot open input file \"%s\". ", FileName );
- if ( FileName = Extra_FileGetSimilarName( FileName, ".genlib", ".lib", ".gen", ".g", NULL ) )
+ if (( FileName = Extra_FileGetSimilarName( FileName, ".genlib", ".lib", ".gen", ".g", NULL )) )
fprintf( pErr, "Did you mean \"%s\"?", FileName );
fprintf( pErr, "\n" );
return 1;
diff --git a/src/map/mapper/mapperCanon.c b/src/map/mapper/mapperCanon.c
index 203c9142..4f93ad3b 100644
--- a/src/map/mapper/mapperCanon.c
+++ b/src/map/mapper/mapperCanon.c
@@ -76,7 +76,7 @@ int Map_CanonComputeSlow( unsigned uTruths[][2], int nVarsMax, int nVarsReal, un
for ( m = 0; m < nMints; m++ )
{
Map_CanonComputePhase6( uTruths, nVarsMax, uTruth, m, uTruthPerm );
- if ( uTruthRes[1] > uTruthPerm[1] || uTruthRes[1] == uTruthPerm[1] && uTruthRes[0] > uTruthPerm[0] )
+ if ( uTruthRes[1] > uTruthPerm[1] || (uTruthRes[1] == uTruthPerm[1] && uTruthRes[0] > uTruthPerm[0]) )
{
uTruthRes[0] = uTruthPerm[0];
uTruthRes[1] = uTruthPerm[1];
@@ -170,7 +170,8 @@ void Map_CanonComputePhase6( unsigned uTruths[][2], int nVars, unsigned uTruth[]
int Map_CanonComputeFast( Map_Man_t * p, int nVarsMax, int nVarsReal, unsigned uTruth[], unsigned char * puPhases, unsigned uTruthRes[] )
{
unsigned uTruth0, uTruth1;
- unsigned uCanon0, uCanon1, uCanonBest, uPhaseBest;
+ unsigned uCanon0, uCanon1, uCanonBest;
+ unsigned uPhaseBest = 16; // Suppress "might be used uninitialized" (asserts require < 16)
int i, Limit;
if ( nVarsMax == 6 )
diff --git a/src/map/mapper/mapperCreate.c b/src/map/mapper/mapperCreate.c
index 157d467b..0a971542 100644
--- a/src/map/mapper/mapperCreate.c
+++ b/src/map/mapper/mapperCreate.c
@@ -27,7 +27,7 @@ static void Map_TableResize( Map_Man_t * p );
static Map_Node_t * Map_TableLookup( Map_Man_t * p, Map_Node_t * p1, Map_Node_t * p2 );
// hash key for the structural hash table
-static inline unsigned Map_HashKey2( Map_Node_t * p0, Map_Node_t * p1, int TableSize ) { return ((unsigned)(p0) + (unsigned)(p1) * 12582917) % TableSize; }
+static inline unsigned Map_HashKey2( Map_Node_t * p0, Map_Node_t * p1, int TableSize ) { return (unsigned)(((PORT_PTRUINT_T)(p0) + (PORT_PTRUINT_T)(p1) * 12582917) % TableSize); }
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
diff --git a/src/map/mapper/mapperCut.c b/src/map/mapper/mapperCut.c
index b05e9d0c..46405547 100644
--- a/src/map/mapper/mapperCut.c
+++ b/src/map/mapper/mapperCut.c
@@ -355,8 +355,8 @@ Map_Cut_t * Map_CutMergeLists( Map_Man_t * p, Map_CutTable_t * pTable,
// if ( p->nVarsMax == 5 )
// pCut->uTruth = Map_CutComputeTruth( p, pCut, pTemp1, pTemp2, fComp1, fComp2 );
// add it to the corresponding list
- pCut->pNext = pLists[pCut->nLeaves];
- pLists[pCut->nLeaves] = pCut;
+ pCut->pNext = pLists[(int)pCut->nLeaves];
+ pLists[(int)pCut->nLeaves] = pCut;
// count this cut and quit if limit is reached
Counter++;
if ( Counter == MAP_CUTS_MAX_COMPUTE )
@@ -389,8 +389,8 @@ Map_Cut_t * Map_CutMergeLists( Map_Man_t * p, Map_CutTable_t * pTable,
// if ( p->nVarsMax == 5 )
// pCut->uTruth = Map_CutComputeTruth( p, pCut, pTemp1, pTemp2, fComp1, fComp2 );
// add it to the corresponding list
- pCut->pNext = pLists[pCut->nLeaves];
- pLists[pCut->nLeaves] = pCut;
+ pCut->pNext = pLists[(int)pCut->nLeaves];
+ pLists[(int)pCut->nLeaves] = pCut;
// count this cut and quit if limit is reached
Counter++;
if ( Counter == MAP_CUTS_MAX_COMPUTE )
@@ -426,8 +426,8 @@ Map_Cut_t * Map_CutMergeLists( Map_Man_t * p, Map_CutTable_t * pTable,
// if ( p->nVarsMax == 5 )
// pCut->uTruth = Map_CutComputeTruth( p, pCut, pTemp1, pTemp2, fComp1, fComp2 );
// add it to the corresponding list
- pCut->pNext = pLists[pCut->nLeaves];
- pLists[pCut->nLeaves] = pCut;
+ pCut->pNext = pLists[(int)pCut->nLeaves];
+ pLists[(int)pCut->nLeaves] = pCut;
// count this cut and quit if limit is reached
Counter++;
if ( Counter == MAP_CUTS_MAX_COMPUTE )
@@ -493,8 +493,8 @@ Map_Cut_t * Map_CutMergeLists2( Map_Man_t * p, Map_CutTable_t * pTable,
pCut->pOne = Map_CutNotCond( pTemp1, fComp1 );
pCut->pTwo = Map_CutNotCond( pTemp2, fComp2 );
// add it to the corresponding list
- pCut->pNext = pLists[pCut->nLeaves];
- pLists[pCut->nLeaves] = pCut;
+ pCut->pNext = pLists[(int)pCut->nLeaves];
+ pLists[(int)pCut->nLeaves] = pCut;
// count this cut and quit if limit is reached
Counter++;
if ( Counter == MAP_CUTS_MAX_COMPUTE )
diff --git a/src/map/mapper/mapperCutUtils.c b/src/map/mapper/mapperCutUtils.c
index 4450cb04..42bdd103 100644
--- a/src/map/mapper/mapperCutUtils.c
+++ b/src/map/mapper/mapperCutUtils.c
@@ -161,7 +161,8 @@ int Map_NodeGetLeafPhase( Map_Node_t * pNode, int fPhase, int iLeaf )
***********************************************************************/
Map_Cut_t * Map_CutListAppend( Map_Cut_t * pSetAll, Map_Cut_t * pSets )
{
- Map_Cut_t * pPrev, * pTemp;
+ Map_Cut_t * pPrev = NULL; // Suppress "might be used uninitialized"
+ Map_Cut_t * pTemp;
if ( pSetAll == NULL )
return pSets;
if ( pSets == NULL )
diff --git a/src/map/mapper/mapperLib.c b/src/map/mapper/mapperLib.c
index d916487e..9c47ed03 100644
--- a/src/map/mapper/mapperLib.c
+++ b/src/map/mapper/mapperLib.c
@@ -15,6 +15,11 @@
Revision [$Id: mapperLib.c,v 1.6 2005/01/23 06:59:44 alanmi Exp $]
***********************************************************************/
+#define _BSD_SOURCE
+
+#ifndef WIN32
+#include <unistd.h>
+#endif
#include "mapperInt.h"
diff --git a/src/map/mapper/mapperMatch.c b/src/map/mapper/mapperMatch.c
index bfa72601..74b83f75 100644
--- a/src/map/mapper/mapperMatch.c
+++ b/src/map/mapper/mapperMatch.c
@@ -137,7 +137,8 @@ int Map_MatchNodePhase( Map_Man_t * p, Map_Node_t * pNode, int fPhase )
{
Map_Match_t MatchBest, * pMatch;
Map_Cut_t * pCut, * pCutBest;
- float Area1, Area2, fWorstLimit;
+ float Area1 = 0.0; // Suppress "might be used uninitialized
+ float Area2, fWorstLimit;
// skip the cuts that have been unassigned during area recovery
pCutBest = pNode->pCutBest[fPhase];
diff --git a/src/map/mapper/mapperSuper.c b/src/map/mapper/mapperSuper.c
index ce6a780f..92f73ecb 100644
--- a/src/map/mapper/mapperSuper.c
+++ b/src/map/mapper/mapperSuper.c
@@ -80,7 +80,8 @@ int Map_LibraryReadFile( Map_SuperLib_t * pLib, FILE * pFile )
char pBuffer[2000];
FILE * pFileGen;
Map_Super_t * pGate;
- char * pTemp, * pLibName;
+ char * pTemp = NULL; // Suppress "might be used uninitialized"
+ char * pLibName;
int nCounter, nGatesTotal;
unsigned uCanon[2];
@@ -400,7 +401,7 @@ void Map_LibraryPrintSupergate( Map_Super_t * pGate )
printf( "%5d : ", pGate->nUsed );
printf( "%5d ", pGate->Num );
printf( "A = %5.2f ", pGate->Area );
- printf( "D = %5.2f ", pGate->tDelayMax );
+ printf( "D = %5.2f/%5.2f/%5.2f ", pGate->tDelayMax.Rise, pGate->tDelayMax.Fall, pGate->tDelayMax.Worst );
printf( "%s", pGate->pFormula );
printf( "\n" );
}
diff --git a/src/map/mapper/mapperTable.c b/src/map/mapper/mapperTable.c
index d0cb7a01..3feba352 100644
--- a/src/map/mapper/mapperTable.c
+++ b/src/map/mapper/mapperTable.c
@@ -231,7 +231,7 @@ void Map_SuperTableResize( Map_HashTable_t * p )
{
Map_HashEntry_t ** pBinsNew;
Map_HashEntry_t * pEnt, * pEnt2;
- int nBinsNew, Counter, i, clk = clock();
+ int nBinsNew, Counter, i;
unsigned Key;
// get the new table size
nBinsNew = Cudd_Prime(2 * p->nBins);
diff --git a/src/map/mapper/mapperTree.c b/src/map/mapper/mapperTree.c
index ef66082d..76c1e520 100644
--- a/src/map/mapper/mapperTree.c
+++ b/src/map/mapper/mapperTree.c
@@ -34,7 +34,7 @@ static int Map_LibraryGetMaxSuperPi_rec( Map_Super_t * pGate );
static unsigned Map_LibraryGetGateSupp_rec( Map_Super_t * pGate );
// fanout limits
-extern const int s_MapFanoutLimits[10] = { 1/*0*/, 10/*1*/, 5/*2*/, 2/*3*/, 1/*4*/, 1/*5*/, 1/*6*/ };
+static const int s_MapFanoutLimits[10] = { 1/*0*/, 10/*1*/, 5/*2*/, 2/*3*/, 1/*4*/, 1/*5*/, 1/*6*/ };
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
diff --git a/src/map/mapper/mapperTruth.c b/src/map/mapper/mapperTruth.c
index 388b6dd3..dcc8c1d3 100644
--- a/src/map/mapper/mapperTruth.c
+++ b/src/map/mapper/mapperTruth.c
@@ -194,7 +194,7 @@ void Map_TruthsCut( Map_Man_t * p, Map_Cut_t * pCut )
void Map_TruthsCutOne( Map_Man_t * p, Map_Cut_t * pCut, unsigned uTruth[] )
{
unsigned uTruth1[2], uTruth2[2];
- Map_Cut_t * pTemp;
+ Map_Cut_t * pTemp = NULL; // Suppress "might be used uninitialized"
int i;
// mark the cut leaves
for ( i = 0; i < pCut->nLeaves; i++ )
diff --git a/src/map/mapper/mapperUtils.c b/src/map/mapper/mapperUtils.c
index 11a3a683..b1f425a3 100644
--- a/src/map/mapper/mapperUtils.c
+++ b/src/map/mapper/mapperUtils.c
@@ -37,7 +37,6 @@ static unsigned Map_MappingExpandTruth_rec( unsigned uTruth, int nVars );
static void Map_MappingGetChoiceLevels( Map_Man_t * pMan, Map_Node_t * p1, Map_Node_t * p2, int * pMin, int * pMax );
static float Map_MappingGetChoiceVolumes( Map_Man_t * pMan, Map_Node_t * p1, Map_Node_t * p2 );
static int Map_MappingCountUsedNodes( Map_Man_t * pMan, int fChoices );
-static Map_Man_t * s_pMan = NULL;
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
diff --git a/src/map/mio/mio.c b/src/map/mio/mio.c
index 10a5af9d..e0000c38 100644
--- a/src/map/mio/mio.c
+++ b/src/map/mio/mio.c
@@ -16,6 +16,12 @@
***********************************************************************/
+#define _BSD_SOURCE
+
+#ifndef WIN32
+#include <unistd.h>
+#endif
+
#include "abc.h"
#include "mvc.h"
#include "mainInt.h"
diff --git a/src/map/mio/mioRead.c b/src/map/mio/mioRead.c
index dc665050..5b92d3e1 100644
--- a/src/map/mio/mioRead.c
+++ b/src/map/mio/mioRead.c
@@ -16,6 +16,7 @@
***********************************************************************/
+#include <ctype.h>
#include "mioInt.h"
////////////////////////////////////////////////////////////////////////
@@ -34,10 +35,6 @@ static char * chomp( char *s );
static void Mio_LibraryDetectSpecialGates( Mio_Library_t * pLib );
static void Io_ReadFileRemoveComments( char * pBuffer, int * pnDots, int * pnLines );
-#ifdef WIN32
-extern int isspace( int c ); // to silence the warning in VS
-#endif
-
/**Function*************************************************************
Synopsis [Read the genlib type of library.]
diff --git a/src/map/super/superAnd.c b/src/map/super/superAnd.c
index 26235a0e..8e831952 100644
--- a/src/map/super/superAnd.c
+++ b/src/map/super/superAnd.c
@@ -306,7 +306,7 @@ Super2_Lib_t * Super2_LibFirst( Super2_Man_t * pMan, int nInputs )
{
pLib->pGates[v+1] = (Super2_Gate_t *)Extra_MmFixedEntryFetch( pMan->pMem );
memset( pLib->pGates[v+1], 0, sizeof(Super2_Gate_t) );
- pLib->pGates[v+1]->pTwo = (Super2_Gate_t *)v;
+ pLib->pGates[v+1]->pTwo = (Super2_Gate_t *)(PORT_PTRUINT_T)v;
}
// set up their truth tables
@@ -347,7 +347,7 @@ Super2_Lib_t * Super2_LibCompute( Super2_Man_t * pMan, Super2_Lib_t * pLib )
{
uTruthR = ((pGate1->uTruth & pLibNew->uMaskBit)? Mask & ~pGate1->uTruth : pGate1->uTruth);
- if ( stmm_lookup( pMan->tTable, (char *)uTruthR, (char **)&pGate2 ) )
+ if ( stmm_lookup( pMan->tTable, (char *)(PORT_PTRUINT_T)uTruthR, (char **)&pGate2 ) )
{
printf( "New gate:\n" );
Super2_LibWriteGate( stdout, pLibNew, pGate1 );
@@ -355,7 +355,7 @@ Super2_Lib_t * Super2_LibCompute( Super2_Man_t * pMan, Super2_Lib_t * pLib )
Super2_LibWriteGate( stdout, pLibNew, pGate2 );
assert( 0 );
}
- stmm_insert( pMan->tTable, (char *)uTruthR, (char *)pGate1 );
+ stmm_insert( pMan->tTable, (char *)(PORT_PTRUINT_T)uTruthR, (char *)(PORT_PTRUINT_T)pGate1 );
}
@@ -382,7 +382,7 @@ Super2_Lib_t * Super2_LibCompute( Super2_Man_t * pMan, Super2_Lib_t * pLib )
uTruth = uTruth1 & uTruth2;
uTruthR = ((uTruth & pLibNew->uMaskBit)? Mask & ~uTruth : uTruth);
- if ( !stmm_find_or_add( pMan->tTable, (char *)uTruthR, (char ***)&ppGate ) )
+ if ( !stmm_find_or_add( pMan->tTable, (char *)(PORT_PTRUINT_T)uTruthR, (char ***)&ppGate ) )
{
pGateNew = (Super2_Gate_t *)Extra_MmFixedEntryFetch( pMan->pMem );
pGateNew->pOne = pGate1;
@@ -396,7 +396,7 @@ Super2_Lib_t * Super2_LibCompute( Super2_Man_t * pMan, Super2_Lib_t * pLib )
uTruth = uTruth1c & uTruth2;
uTruthR = ((uTruth & pLibNew->uMaskBit)? Mask & ~uTruth : uTruth);
- if ( !stmm_find_or_add( pMan->tTable, (char *)uTruthR, (char ***)&ppGate ) )
+ if ( !stmm_find_or_add( pMan->tTable, (char *)(PORT_PTRUINT_T)uTruthR, (char ***)&ppGate ) )
{
pGateNew = (Super2_Gate_t *)Extra_MmFixedEntryFetch( pMan->pMem );
pGateNew->pOne = Super2_Not(pGate1);
@@ -410,7 +410,7 @@ Super2_Lib_t * Super2_LibCompute( Super2_Man_t * pMan, Super2_Lib_t * pLib )
uTruth = uTruth1 & uTruth2c;
uTruthR = ((uTruth & pLibNew->uMaskBit)? Mask & ~uTruth : uTruth);
- if ( !stmm_find_or_add( pMan->tTable, (char *)uTruthR, (char ***)&ppGate ) )
+ if ( !stmm_find_or_add( pMan->tTable, (char *)(PORT_PTRUINT_T)uTruthR, (char ***)&ppGate ) )
{
pGateNew = (Super2_Gate_t *)Extra_MmFixedEntryFetch( pMan->pMem );
pGateNew->pOne = pGate1;
@@ -424,7 +424,7 @@ Super2_Lib_t * Super2_LibCompute( Super2_Man_t * pMan, Super2_Lib_t * pLib )
uTruth = uTruth1c & uTruth2c;
uTruthR = ((uTruth & pLibNew->uMaskBit)? Mask & ~uTruth : uTruth);
- if ( !stmm_find_or_add( pMan->tTable, (char *)uTruthR, (char ***)&ppGate ) )
+ if ( !stmm_find_or_add( pMan->tTable, (char *)(PORT_PTRUINT_T)uTruthR, (char ***)&ppGate ) )
{
pGateNew = (Super2_Gate_t *)Extra_MmFixedEntryFetch( pMan->pMem );
pGateNew->pOne = Super2_Not(pGate1);
@@ -600,7 +600,7 @@ char * Super2_LibWriteGate_rec( Super2_Gate_t * pGate, int fInv, int Level )
}
else
{
- pBuffer1[0] = (fInv? 'A' + ((int)pGate->pTwo): 'a' + ((int)pGate->pTwo));
+ pBuffer1[0] = (fInv? 'A' + ((int)(PORT_PTRUINT_T)pGate->pTwo): 'a' + ((int)(PORT_PTRUINT_T)pGate->pTwo));
pBuffer1[1] = 0;
}
return pBuffer1;
diff --git a/src/map/super/superGate.c b/src/map/super/superGate.c
index 91a1e513..915ff86d 100644
--- a/src/map/super/superGate.c
+++ b/src/map/super/superGate.c
@@ -295,7 +295,8 @@ Super_Man_t * Super_Compute( Super_Man_t * pMan, Mio_Gate_t ** ppGates, int nGat
{
Super_Gate_t * pSupers[6], * pGate0, * pGate1, * pGate2, * pGate3, * pGate4, * pGate5, * pGateNew;
float tPinDelaysRes[6], * ptPinDelays[6], tPinDelayMax, tDelayMio;
- float Area, Area0, Area1, Area2, Area3, Area4, AreaMio;
+ float Area = 0.0; // Suppress "might be used uninitialized"
+ float Area0, Area1, Area2, Area3, Area4, AreaMio;
unsigned uTruth[2], uTruths[6][2];
int i0, i1, i2, i3, i4, i5;
Super_Gate_t ** ppGatesLimit;
@@ -731,7 +732,7 @@ void Super_AddGateToTable( Super_Man_t * pMan, Super_Gate_t * pGate )
unsigned Key;
// Key = pGate->uTruth[0] + 2003 * pGate->uTruth[1];
Key = pGate->uTruth[0] ^ pGate->uTruth[1];
- if ( !stmm_find_or_add( pMan->tTable, (char *)Key, (char ***)&ppList ) )
+ if ( !stmm_find_or_add( pMan->tTable, (char *)(PORT_PTRUINT_T)Key, (char ***)&ppList ) )
*ppList = NULL;
pGate->pNext = *ppList;
*ppList = pGate;
@@ -772,7 +773,7 @@ bool Super_CompareGates( Super_Man_t * pMan, unsigned uTruth[], float Area, floa
// get hold of the place where the entry is stored
// Key = uTruth[0] + 2003 * uTruth[1];
Key = uTruth[0] ^ uTruth[1];
- if ( !stmm_find( pMan->tTable, (char *)Key, (char ***)&ppList ) )
+ if ( !stmm_find( pMan->tTable, (char *)(PORT_PTRUINT_T)Key, (char ***)&ppList ) )
return 1;
// the entry with this truth table is found
pPrev = NULL;