mirror of https://github.com/YosysHQ/abc.git
Compiler warnings.
This commit is contained in:
parent
67c47fa44a
commit
85a94766a6
|
|
@ -399,7 +399,7 @@ Gia_Man_t * Gia_AigerReadFromMemory( char * pContents, int nFileSize, int fGiaSi
|
|||
while ( *pCur == ' ' )
|
||||
pCur++;
|
||||
// skip till the end of line
|
||||
for ( pName = pCur; *pCur && *pCur != '\n'; pCur++ );
|
||||
for ( pName = (char *)pCur; *pCur && *pCur != '\n'; pCur++ );
|
||||
if ( *pCur == '\n' )
|
||||
*pCur = 0;
|
||||
// save the name
|
||||
|
|
|
|||
|
|
@ -2618,7 +2618,7 @@ Gia_Man_t * Gia_ManComputeCofs2( Gia_Man_t * p )
|
|||
Gia_ManForEachCi( p, pObj, i )
|
||||
{
|
||||
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_ManForEachRi( p, pSink, o )
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
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_WriteVerilogModule( pFile, p, Mod, pNames, fSimple );
|
||||
|
|
@ -633,7 +633,7 @@ static inline void Ndr_Write( char * pFileName, void * pDesign )
|
|||
{
|
||||
Ndr_Data_t * p = (Ndr_Data_t *)pDesign; int RetValue;
|
||||
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->pHead, 1, p->pBody[0], pFile );
|
||||
fclose( pFile );
|
||||
|
|
|
|||
|
|
@ -896,6 +896,7 @@ Abc_Ntk_t * Abc_NtkSpecialMapping( Abc_Ntk_t * pNtk, int fVerbose )
|
|||
}
|
||||
|
||||
if ( fVerbose )
|
||||
{
|
||||
Abc_NtkForEachNode( pNtk, pObj, i )
|
||||
{
|
||||
printf( "Node %4d : ", i );
|
||||
|
|
@ -909,6 +910,7 @@ Abc_Ntk_t * Abc_NtkSpecialMapping( Abc_Ntk_t * pNtk, int fVerbose )
|
|||
printf( " " );
|
||||
Vec_IntPrint( Vec_WecEntry(vSupps, i) );
|
||||
}
|
||||
}
|
||||
|
||||
Abc_NtkCleanCopy( pNtk );
|
||||
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 )
|
|||
{
|
||||
int fVerbose = 0;
|
||||
int NodeBef = Abc_NtkNodeNum(pNtkFrames);
|
||||
char Buffer[10];
|
||||
char Buffer[16];
|
||||
Abc_Obj_t * pNode, * pLatch;
|
||||
int i;
|
||||
// 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
|
|||
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 * pConst1, * pConst1New;
|
||||
int i;
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
{
|
||||
char Buffer[10];
|
||||
char Buffer[16];
|
||||
Io_MvVar_t * pVar;
|
||||
Abc_Obj_t * pFanin, * pNet;
|
||||
char * pCur, * pNext;
|
||||
|
|
|
|||
|
|
@ -487,7 +487,7 @@ Wlc_Ntk_t * Wlc_NtkFromNdr( void * pData )
|
|||
pNtk->pManName = Abc_NamStart( NameIdMax+1, 10 );
|
||||
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 );
|
||||
assert( !fFound && i == NameId );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ Wln_Ntk_t * Wln_NtkFromNdr( void * pData, int fDump )
|
|||
pNtk->pManName = Abc_NamStart( NameIdMax+1, 10 );
|
||||
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 );
|
||||
assert( !fFound && i == NameId );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,8 +86,7 @@ int Fxu_PreprocessCubePairs( Fxu_Matrix * p, Vec_Ptr_t * vCovers, int nPairsTota
|
|||
assert( iPair == nPairsTotal );
|
||||
|
||||
// allocate storage for counters of cube pairs by difference
|
||||
pnPairCounters = ABC_FALLOC( int, 2 * nBitsMax );
|
||||
memset( pnPairCounters, 0, sizeof(int) * 2 * nBitsMax );
|
||||
pnPairCounters = ABC_CALLOC( int, 2 * nBitsMax );
|
||||
// count the number of different pairs
|
||||
for ( k = 0; k < nPairsTotal; k++ )
|
||||
pnPairCounters[ pnLitsDiff[k] ]++;
|
||||
|
|
|
|||
Loading…
Reference in New Issue