Commit 85a94766 by Alan Mishchenko

Compiler warnings.

parent 67c47fa4
...@@ -399,7 +399,7 @@ Gia_Man_t * Gia_AigerReadFromMemory( char * pContents, int nFileSize, int fGiaSi ...@@ -399,7 +399,7 @@ Gia_Man_t * Gia_AigerReadFromMemory( char * pContents, int nFileSize, int fGiaSi
while ( *pCur == ' ' ) while ( *pCur == ' ' )
pCur++; pCur++;
// skip till the end of line // skip till the end of line
for ( pName = pCur; *pCur && *pCur != '\n'; pCur++ ); for ( pName = (char *)pCur; *pCur && *pCur != '\n'; pCur++ );
if ( *pCur == '\n' ) if ( *pCur == '\n' )
*pCur = 0; *pCur = 0;
// save the name // save the name
......
...@@ -2618,7 +2618,7 @@ Gia_Man_t * Gia_ManComputeCofs2( Gia_Man_t * p ) ...@@ -2618,7 +2618,7 @@ Gia_Man_t * Gia_ManComputeCofs2( Gia_Man_t * p )
Gia_ManForEachCi( p, pObj, i ) Gia_ManForEachCi( p, pObj, i )
{ {
pObj->Value = Gia_ManAppendCi(pNew); pObj->Value = Gia_ManAppendCi(pNew);
assert( pObj->Value = Abc_Var2Lit( 1 + Gia_ObjCioId(pObj), 0 ) ); assert( (int)pObj->Value == Abc_Var2Lit( 1 + Gia_ObjCioId(pObj), 0 ) );
} }
Gia_ManHashAlloc( pNew ); Gia_ManHashAlloc( pNew );
Gia_ManForEachRi( p, pSink, o ) Gia_ManForEachRi( p, pSink, o )
......
...@@ -517,7 +517,7 @@ static inline void Ndr_WriteVerilog( char * pFileName, void * pDesign, char ** p ...@@ -517,7 +517,7 @@ static inline void Ndr_WriteVerilog( char * pFileName, void * pDesign, char ** p
Ndr_Data_t * p = (Ndr_Data_t *)pDesign; int Mod; Ndr_Data_t * p = (Ndr_Data_t *)pDesign; int Mod;
FILE * pFile = pFileName ? fopen( pFileName, "wb" ) : stdout; FILE * pFile = pFileName ? fopen( pFileName, "wb" ) : stdout;
if ( pFile == NULL ) { printf( "Cannot open file \"%s\" for writing.\n", pFileName ); return; } if ( pFile == NULL ) { printf( "Cannot open file \"%s\" for writing.\n", pFileName ? pFileName : "stdout" ); return; }
Ndr_DesForEachMod( p, Mod ) Ndr_DesForEachMod( p, Mod )
Ndr_WriteVerilogModule( pFile, p, Mod, pNames, fSimple ); Ndr_WriteVerilogModule( pFile, p, Mod, pNames, fSimple );
...@@ -633,7 +633,7 @@ static inline void Ndr_Write( char * pFileName, void * pDesign ) ...@@ -633,7 +633,7 @@ static inline void Ndr_Write( char * pFileName, void * pDesign )
{ {
Ndr_Data_t * p = (Ndr_Data_t *)pDesign; int RetValue; Ndr_Data_t * p = (Ndr_Data_t *)pDesign; int RetValue;
FILE * pFile = fopen( pFileName, "wb" ); FILE * pFile = fopen( pFileName, "wb" );
if ( pFile == NULL ) { printf( "Cannot open file \"%s\" for writing.\n", pFileName ); return; } if ( pFile == NULL ) { printf( "Cannot open file \"%s\" for writing.\n", pFileName ? pFileName : "stdout" ); return; }
RetValue = (int)fwrite( p->pBody, 4, p->pBody[0], pFile ); RetValue = (int)fwrite( p->pBody, 4, p->pBody[0], pFile );
RetValue = (int)fwrite( p->pHead, 1, p->pBody[0], pFile ); RetValue = (int)fwrite( p->pHead, 1, p->pBody[0], pFile );
fclose( pFile ); fclose( pFile );
......
...@@ -896,6 +896,7 @@ Abc_Ntk_t * Abc_NtkSpecialMapping( Abc_Ntk_t * pNtk, int fVerbose ) ...@@ -896,6 +896,7 @@ Abc_Ntk_t * Abc_NtkSpecialMapping( Abc_Ntk_t * pNtk, int fVerbose )
} }
if ( fVerbose ) if ( fVerbose )
{
Abc_NtkForEachNode( pNtk, pObj, i ) Abc_NtkForEachNode( pNtk, pObj, i )
{ {
printf( "Node %4d : ", i ); printf( "Node %4d : ", i );
...@@ -909,6 +910,7 @@ Abc_Ntk_t * Abc_NtkSpecialMapping( Abc_Ntk_t * pNtk, int fVerbose ) ...@@ -909,6 +910,7 @@ Abc_Ntk_t * Abc_NtkSpecialMapping( Abc_Ntk_t * pNtk, int fVerbose )
printf( " " ); printf( " " );
Vec_IntPrint( Vec_WecEntry(vSupps, i) ); Vec_IntPrint( Vec_WecEntry(vSupps, i) );
} }
}
Abc_NtkCleanCopy( pNtk ); Abc_NtkCleanCopy( pNtk );
pNtkNew = Abc_NtkStartFrom( pNtk, ABC_NTK_LOGIC, ABC_FUNC_SOP ); pNtkNew = Abc_NtkStartFrom( pNtk, ABC_NTK_LOGIC, ABC_FUNC_SOP );
......
...@@ -863,7 +863,7 @@ void Abc_NtkAddFrame( Abc_Ntk_t * pNtkFrames, Abc_Ntk_t * pNtk, int iFrame ) ...@@ -863,7 +863,7 @@ void Abc_NtkAddFrame( Abc_Ntk_t * pNtkFrames, Abc_Ntk_t * pNtk, int iFrame )
{ {
int fVerbose = 0; int fVerbose = 0;
int NodeBef = Abc_NtkNodeNum(pNtkFrames); int NodeBef = Abc_NtkNodeNum(pNtkFrames);
char Buffer[10]; char Buffer[16];
Abc_Obj_t * pNode, * pLatch; Abc_Obj_t * pNode, * pLatch;
int i; int i;
// create the prefix to be added to the node names // create the prefix to be added to the node names
...@@ -1008,7 +1008,7 @@ Abc_Ntk_t * Abc_NtkFrames2( Abc_Ntk_t * pNtk, int nFrames, int fInitial, AddFram ...@@ -1008,7 +1008,7 @@ Abc_Ntk_t * Abc_NtkFrames2( Abc_Ntk_t * pNtk, int nFrames, int fInitial, AddFram
void Abc_NtkAddFrame2( Abc_Ntk_t * pNtkFrames, Abc_Ntk_t * pNtk, int iFrame, Vec_Ptr_t * vNodes, AddFrameMapping addFrameMapping, void* arg ) void Abc_NtkAddFrame2( Abc_Ntk_t * pNtkFrames, Abc_Ntk_t * pNtk, int iFrame, Vec_Ptr_t * vNodes, AddFrameMapping addFrameMapping, void* arg )
{ {
/* /*
char Buffer[10]; char Buffer[16];
Abc_Obj_t * pNode, * pNodeNew, * pLatch; Abc_Obj_t * pNode, * pNodeNew, * pLatch;
Abc_Obj_t * pConst1, * pConst1New; Abc_Obj_t * pConst1, * pConst1New;
int i; int i;
......
...@@ -1657,7 +1657,7 @@ static int Io_MvWriteValues( Abc_Obj_t * pNode, Vec_Str_t * vFunc ) ...@@ -1657,7 +1657,7 @@ static int Io_MvWriteValues( Abc_Obj_t * pNode, Vec_Str_t * vFunc )
***********************************************************************/ ***********************************************************************/
static int Io_MvParseLiteralMv( Io_MvMod_t * p, Abc_Obj_t * pNode, char * pToken, Vec_Str_t * vFunc, int iLit ) static int Io_MvParseLiteralMv( Io_MvMod_t * p, Abc_Obj_t * pNode, char * pToken, Vec_Str_t * vFunc, int iLit )
{ {
char Buffer[10]; char Buffer[16];
Io_MvVar_t * pVar; Io_MvVar_t * pVar;
Abc_Obj_t * pFanin, * pNet; Abc_Obj_t * pFanin, * pNet;
char * pCur, * pNext; char * pCur, * pNext;
......
...@@ -487,7 +487,7 @@ Wlc_Ntk_t * Wlc_NtkFromNdr( void * pData ) ...@@ -487,7 +487,7 @@ Wlc_Ntk_t * Wlc_NtkFromNdr( void * pData )
pNtk->pManName = Abc_NamStart( NameIdMax+1, 10 ); pNtk->pManName = Abc_NamStart( NameIdMax+1, 10 );
for ( i = 1; i <= NameIdMax; i++ ) for ( i = 1; i <= NameIdMax; i++ )
{ {
char pName[20]; sprintf( pName, "s%0*d", nDigits, i ); char pName[100]; sprintf( pName, "s%0*d", nDigits, i );
NameId = Abc_NamStrFindOrAdd( pNtk->pManName, pName, &fFound ); NameId = Abc_NamStrFindOrAdd( pNtk->pManName, pName, &fFound );
assert( !fFound && i == NameId ); assert( !fFound && i == NameId );
} }
......
...@@ -256,7 +256,7 @@ Wln_Ntk_t * Wln_NtkFromNdr( void * pData, int fDump ) ...@@ -256,7 +256,7 @@ Wln_Ntk_t * Wln_NtkFromNdr( void * pData, int fDump )
pNtk->pManName = Abc_NamStart( NameIdMax+1, 10 ); pNtk->pManName = Abc_NamStart( NameIdMax+1, 10 );
for ( i = 1; i <= NameIdMax; i++ ) for ( i = 1; i <= NameIdMax; i++ )
{ {
char pName[20]; sprintf( pName, "s%0*d", nDigits, i ); char pName[100]; sprintf( pName, "s%0*d", nDigits, i );
NameId = Abc_NamStrFindOrAdd( pNtk->pManName, pName, &fFound ); NameId = Abc_NamStrFindOrAdd( pNtk->pManName, pName, &fFound );
assert( !fFound && i == NameId ); assert( !fFound && i == NameId );
} }
......
...@@ -86,8 +86,7 @@ int Fxu_PreprocessCubePairs( Fxu_Matrix * p, Vec_Ptr_t * vCovers, int nPairsTota ...@@ -86,8 +86,7 @@ int Fxu_PreprocessCubePairs( Fxu_Matrix * p, Vec_Ptr_t * vCovers, int nPairsTota
assert( iPair == nPairsTotal ); assert( iPair == nPairsTotal );
// allocate storage for counters of cube pairs by difference // allocate storage for counters of cube pairs by difference
pnPairCounters = ABC_FALLOC( int, 2 * nBitsMax ); pnPairCounters = ABC_CALLOC( int, 2 * nBitsMax );
memset( pnPairCounters, 0, sizeof(int) * 2 * nBitsMax );
// count the number of different pairs // count the number of different pairs
for ( k = 0; k < nPairsTotal; k++ ) for ( k = 0; k < nPairsTotal; k++ )
pnPairCounters[ pnLitsDiff[k] ]++; pnPairCounters[ pnLitsDiff[k] ]++;
......
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