Commit 203a7d6a by Alan Mishchenko

Fixing broken build and compiler warnings.

parent 92abe5cb
...@@ -41,7 +41,7 @@ ABC_NAMESPACE_IMPL_START ...@@ -41,7 +41,7 @@ ABC_NAMESPACE_IMPL_START
SeeAlso [] SeeAlso []
***********************************************************************/ ***********************************************************************/
int Gia_Sim4Try( char * pFileName0, char * pFileName1, char * pFileName2, int nWords, int nBeam, int LevL, int LevU, int fOrder, int fFancy, int fVerbose ) int Gia_Sim4Try( char * pFileName0, char * pFileName1, char * pFileName2, int nWords, int nBeam, int LevL, int LevU, int fOrder, int fFancy, int fUseBuf, int fVerbose )
{ {
return 0; return 0;
} }
......
...@@ -260,7 +260,7 @@ void * Acb_VerilogSimpleParse( Vec_Int_t * vBuffer, Abc_Nam_t * pNames ) ...@@ -260,7 +260,7 @@ void * Acb_VerilogSimpleParse( Vec_Int_t * vBuffer, Abc_Nam_t * pNames )
Vec_IntPush( vTypes, -1 ); Vec_IntPush( vTypes, -1 );
Vec_IntPush( vTypes, Vec_IntSize(vFanins) ); Vec_IntPush( vTypes, Vec_IntSize(vFanins) );
// create design // create design
pDesign = Ndr_Create( Vec_IntEntry(vBuffer, 1) ); pDesign = (Ndr_Data_t *)Ndr_Create( Vec_IntEntry(vBuffer, 1) );
ModuleID = Ndr_AddModule( pDesign, Vec_IntEntry(vBuffer, 1) ); ModuleID = Ndr_AddModule( pDesign, Vec_IntEntry(vBuffer, 1) );
// create inputs // create inputs
Ndr_DataResize( pDesign, Vec_IntSize(vInputs) ); Ndr_DataResize( pDesign, Vec_IntSize(vInputs) );
...@@ -2681,7 +2681,7 @@ int Acb_NtkEcoPerform( Acb_Ntk_t * pNtkF, Acb_Ntk_t * pNtkG, char * pFileName[4] ...@@ -2681,7 +2681,7 @@ int Acb_NtkEcoPerform( Acb_Ntk_t * pNtkF, Acb_Ntk_t * pNtkG, char * pFileName[4]
// generate output files // generate output files
if ( pFileName[3] == NULL ) Acb_GenerateFilePatch( vPatch, "patch.v" ); if ( pFileName[3] == NULL ) Acb_GenerateFilePatch( vPatch, "patch.v" );
Acb_GenerateFileOut( vInst, pFileName[0], pFileName[3] ? pFileName[3] : "out.v", vPatch ); Acb_GenerateFileOut( vInst, pFileName[0], pFileName[3] ? pFileName[3] : (char *)"out.v", vPatch );
printf( "Finished dumping resulting file \"%s\".\n\n", pFileName[3] ? pFileName[3] : "out.v" ); printf( "Finished dumping resulting file \"%s\".\n\n", pFileName[3] ? pFileName[3] : "out.v" );
//Gia_AigerWrite( pGiaG, "test.aig", 0, 0, 0 ); //Gia_AigerWrite( pGiaG, "test.aig", 0, 0, 0 );
cleanup: cleanup:
......
...@@ -125,7 +125,7 @@ int Cmd_CommandHandleSpecial( Abc_Frame_t * pAbc, const char * sCommand ) ...@@ -125,7 +125,7 @@ int Cmd_CommandHandleSpecial( Abc_Frame_t * pAbc, const char * sCommand )
if ( strstr(sCommand, "#ASSERT") ) if ( strstr(sCommand, "#ASSERT") )
{ {
int Status = 0; int Status = 0;
char * pNumb = strrchr( sCommand, '=' ); char * pNumb = strrchr( (char *)sCommand, '=' );
if ( strstr(sCommand, "_PI_") ) if ( strstr(sCommand, "_PI_") )
{ {
piCount = pNumb ? atoi(pNumb+1) : 0; piCount = pNumb ? atoi(pNumb+1) : 0;
......
...@@ -145,7 +145,7 @@ int Abc_RealMain( int argc, char * argv[] ) ...@@ -145,7 +145,7 @@ int Abc_RealMain( int argc, char * argv[] )
} }
case 'l': { case 'l': {
#ifndef WIN32 #ifndef WIN32
int maxTime = atoi(globalUtilOptarg); rlim_t maxTime = atoi(globalUtilOptarg);
printf("Limiting time to %d seconds\n", maxTime); printf("Limiting time to %d seconds\n", maxTime);
struct rlimit limit = { struct rlimit limit = {
maxTime, /* soft limit */ maxTime, /* soft limit */
......
...@@ -816,7 +816,7 @@ static Vec_Bit_t * Wlc_NtkMarkLimit( Wlc_Ntk_t * p, Wlc_Par_t * pPars ) ...@@ -816,7 +816,7 @@ static Vec_Bit_t * Wlc_NtkMarkLimit( Wlc_Ntk_t * p, Wlc_Par_t * pPars )
Vec_Ptr_t * vMults = Vec_PtrAlloc( 1000 ); Vec_Ptr_t * vMults = Vec_PtrAlloc( 1000 );
Vec_Ptr_t * vFlops = Vec_PtrAlloc( 1000 ); Vec_Ptr_t * vFlops = Vec_PtrAlloc( 1000 );
Wlc_Obj_t * pObj; int i; Wlc_Obj_t * pObj; int i;
Int_Pair_t * pPair; Int_Pair_t * pPair = NULL;
if ( pPars->nLimit == ABC_INFINITY ) if ( pPars->nLimit == ABC_INFINITY )
return NULL; return NULL;
......
...@@ -94,7 +94,7 @@ static char * Wlc_Names[WLC_OBJ_NUMBER+1] = { ...@@ -94,7 +94,7 @@ static char * Wlc_Names[WLC_OBJ_NUMBER+1] = {
NULL // 58: unused NULL // 58: unused
}; };
char * Wlc_ObjTypeName( Wlc_Obj_t * p ) { return p ? (p->Type < WLC_OBJ_NUMBER ? Wlc_Names[p->Type] : "out_of_bound") : "no_obj"; } char * Wlc_ObjTypeName( Wlc_Obj_t * p ) { return p ? (p->Type < WLC_OBJ_NUMBER ? Wlc_Names[p->Type] : (char *)"out_of_bound") : (char *)"no_obj"; }
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS /// /// FUNCTION DEFINITIONS ///
...@@ -489,7 +489,7 @@ static inline void Wlc_NtkPrintDistribAddOne( Vec_Ptr_t * vTypes, Vec_Ptr_t * vO ...@@ -489,7 +489,7 @@ static inline void Wlc_NtkPrintDistribAddOne( Vec_Ptr_t * vTypes, Vec_Ptr_t * vO
{ {
Vec_Wrd_t * vType = (Vec_Wrd_t *)Vec_PtrEntry( vTypes, Type ); Vec_Wrd_t * vType = (Vec_Wrd_t *)Vec_PtrEntry( vTypes, Type );
Vec_Wrd_t * vOccur = (Vec_Wrd_t *)Vec_PtrEntry( vOccurs, Type ); Vec_Wrd_t * vOccur = (Vec_Wrd_t *)Vec_PtrEntry( vOccurs, Type );
word Entry; int i; word Entry = 0; int i;
Vec_WrdForEachEntry( vType, Entry, i ) Vec_WrdForEachEntry( vType, Entry, i )
if ( Entry == Sign ) if ( Entry == Sign )
{ {
......
...@@ -362,7 +362,7 @@ void Wlc_NtkShow( Wlc_Ntk_t * p, Vec_Int_t * vBold ) ...@@ -362,7 +362,7 @@ void Wlc_NtkShow( Wlc_Ntk_t * p, Vec_Int_t * vBold )
FILE * pFile; FILE * pFile;
char FileNameDot[200]; char FileNameDot[200];
char * pName = Extra_FileDesignName(p->pName); char * pName = Extra_FileDesignName(p->pName);
char * pSpec = p->pSpec ? Extra_FileDesignName(p->pSpec) : "unknown"; char * pSpec = p->pSpec ? Extra_FileDesignName(p->pSpec) : (char *)"unknown";
sprintf( FileNameDot, "%s_%s.dot", pName, pSpec ); sprintf( FileNameDot, "%s_%s.dot", pName, pSpec );
ABC_FREE( pName ); ABC_FREE( pName );
if ( strcmp(pSpec, "unknown") ) if ( strcmp(pSpec, "unknown") )
......
...@@ -133,7 +133,7 @@ extern unsigned Dec_GraphDeriveTruth( Dec_Graph_t * pGraph ); ...@@ -133,7 +133,7 @@ extern unsigned Dec_GraphDeriveTruth( Dec_Graph_t * pGraph );
***********************************************************************/ ***********************************************************************/
static inline Dec_Edge_t Dec_EdgeCreate( int Node, int fCompl ) static inline Dec_Edge_t Dec_EdgeCreate( int Node, int fCompl )
{ {
Dec_Edge_t eEdge = { fCompl, Node }; Dec_Edge_t eEdge = { (unsigned)fCompl, (unsigned)Node };
return eEdge; return eEdge;
} }
......
...@@ -122,7 +122,7 @@ struct Dec_Man_t_ ...@@ -122,7 +122,7 @@ struct Dec_Man_t_
***********************************************************************/ ***********************************************************************/
static inline Dec_Edge_t Dec_EdgeCreate( int Node, int fCompl ) static inline Dec_Edge_t Dec_EdgeCreate( int Node, int fCompl )
{ {
Dec_Edge_t eEdge = { fCompl, Node }; Dec_Edge_t eEdge = { (unsigned)fCompl, (unsigned)Node };
return eEdge; return eEdge;
} }
......
...@@ -194,7 +194,7 @@ static inline void Kit_SopShrink( Kit_Sop_t * cSop, int nCubesNew ) ...@@ -194,7 +194,7 @@ static inline void Kit_SopShrink( Kit_Sop_t * cSop, int nCubesNew )
static inline void Kit_SopPushCube( Kit_Sop_t * cSop, unsigned uCube ) { cSop->pCubes[cSop->nCubes++] = uCube; } static inline void Kit_SopPushCube( Kit_Sop_t * cSop, unsigned uCube ) { cSop->pCubes[cSop->nCubes++] = uCube; }
static inline void Kit_SopWriteCube( Kit_Sop_t * cSop, unsigned uCube, int i ) { cSop->pCubes[i] = uCube; } static inline void Kit_SopWriteCube( Kit_Sop_t * cSop, unsigned uCube, int i ) { cSop->pCubes[i] = uCube; }
static inline Kit_Edge_t Kit_EdgeCreate( int Node, int fCompl ) { Kit_Edge_t eEdge = { fCompl, Node }; return eEdge; } static inline Kit_Edge_t Kit_EdgeCreate( int Node, int fCompl ) { Kit_Edge_t eEdge = { (unsigned)fCompl, (unsigned)Node }; return eEdge; }
static inline unsigned Kit_EdgeToInt( Kit_Edge_t eEdge ) { return (eEdge.Node << 1) | eEdge.fCompl; } static inline unsigned Kit_EdgeToInt( Kit_Edge_t eEdge ) { return (eEdge.Node << 1) | eEdge.fCompl; }
static inline Kit_Edge_t Kit_IntToEdge( unsigned Edge ) { return Kit_EdgeCreate( Edge >> 1, Edge & 1 ); } static inline Kit_Edge_t Kit_IntToEdge( unsigned Edge ) { return Kit_EdgeCreate( Edge >> 1, Edge & 1 ); }
//static inline unsigned Kit_EdgeToInt_( Kit_Edge_t eEdge ) { return *(unsigned *)&eEdge; } //static inline unsigned Kit_EdgeToInt_( Kit_Edge_t eEdge ) { return *(unsigned *)&eEdge; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment