mirror of https://github.com/YosysHQ/abc.git
Compiler warnings.
This commit is contained in:
parent
0d0063f7de
commit
b57b546494
|
|
@ -851,7 +851,7 @@ Gia_Man_t * Gia_ManDupCones2( Gia_Man_t * p, int * pOuts, int nOuts, Vec_Int_t *
|
|||
***********************************************************************/
|
||||
int Min_ManRemoveItem( Vec_Wec_t * vCexes, int iItem, int iFirst, int iLimit )
|
||||
{
|
||||
Vec_Int_t * vLevel, * vLevel0 = Vec_WecEntry(vCexes, iItem); int i;
|
||||
Vec_Int_t * vLevel = NULL, * vLevel0 = Vec_WecEntry(vCexes, iItem); int i;
|
||||
assert( iFirst <= iItem && iItem < iLimit );
|
||||
Vec_WecForEachLevelReverseStartStop( vCexes, vLevel, i, iLimit, iFirst )
|
||||
if ( Vec_IntSize(vLevel) > 0 )
|
||||
|
|
|
|||
|
|
@ -1321,7 +1321,7 @@ Abc_Ntk_t * Abc_NtkCreateWithNodes( Vec_Ptr_t * vSop )
|
|||
Abc_Ntk_t * pNtkNew;
|
||||
Abc_Obj_t * pFanin, * pNode, * pNodePo;
|
||||
Vec_Ptr_t * vNames;
|
||||
int i, k, nVars; char Buffer[10];
|
||||
int i, k, nVars; char Buffer[100];
|
||||
char * pSop = (char *)Vec_PtrEntry(vSop, 0);
|
||||
// start the network
|
||||
pNtkNew = Abc_NtkAlloc( ABC_NTK_LOGIC, ABC_FUNC_SOP, 1 );
|
||||
|
|
|
|||
|
|
@ -30991,8 +30991,8 @@ int Abc_CommandAbc9Put( Abc_Frame_t * pAbc, int argc, char ** argv )
|
|||
if ( pAbc->pGia->vNamesOut )
|
||||
{
|
||||
char pSuffix[100];
|
||||
Abc_Obj_t * pObj;
|
||||
int i, nDigits = Abc_Base10Log( Abc_NtkLatchNum(pNtk) );
|
||||
Abc_Obj_t * pObj; int i;
|
||||
unsigned char nDigits = (unsigned char)Abc_Base10Log( Abc_NtkLatchNum(pNtk) );
|
||||
Abc_NtkForEachCo( pNtk, pObj, i ) {
|
||||
if (i < Vec_PtrSize(pAbc->pGia->vNamesOut)) {
|
||||
Nm_ManDeleteIdName(pNtk->pManName, pObj->Id);
|
||||
|
|
@ -44775,8 +44775,8 @@ int Abc_CommandAbc9Cone( Abc_Frame_t * pAbc, int argc, char ** argv )
|
|||
if ( fExtractAll )
|
||||
{
|
||||
char Buffer[1000];
|
||||
Gia_Obj_t * pObj;
|
||||
int i, nDigits = Abc_Base10Log(Gia_ManPoNum(pAbc->pGia));
|
||||
Gia_Obj_t * pObj; int i;
|
||||
unsigned char nDigits = (unsigned char)Abc_Base10Log(Gia_ManPoNum(pAbc->pGia));
|
||||
Gia_ManForEachPo( pAbc->pGia, pObj, i )
|
||||
{
|
||||
Gia_Man_t * pOne = Gia_ManDupDfsCone( pAbc->pGia, pObj );
|
||||
|
|
@ -50514,7 +50514,6 @@ usage:
|
|||
***********************************************************************/
|
||||
int Abc_CommandAbc9ProdAdd( Abc_Frame_t * pAbc, int argc, char ** argv )
|
||||
{
|
||||
Gia_Man_t * pTemp = NULL;
|
||||
int nArgA = 4;
|
||||
int nArgB = 4;
|
||||
int Seed = 0;
|
||||
|
|
|
|||
|
|
@ -1172,7 +1172,7 @@ void Abc_NodePrintSop( FILE * pFile, Abc_Obj_t * pNode, int fUseRealNames )
|
|||
{
|
||||
for ( pCur = pCube; *pCur != ' '; pCur++ )
|
||||
if ( *pCur != '-' )
|
||||
fprintf( pFile, " %s%c", *pCur == '0' ? "!" : "", 'a' + pCur-pCube );
|
||||
fprintf( pFile, " %s%c", *pCur == '0' ? "!" : "", (char)('a' + pCur-pCube) );
|
||||
}
|
||||
}
|
||||
fprintf( pFile, "\n" );
|
||||
|
|
|
|||
|
|
@ -58,8 +58,8 @@ int CmdCommandLoad( Abc_Frame_t * pAbc, int argc, char ** argv )
|
|||
// check if there is the binary
|
||||
if ( (pFile = fopen( Vec_StrArray(vCommand), "r" )) == NULL )
|
||||
{
|
||||
Vec_StrFree( vCommand );
|
||||
Abc_Print( -1, "Cannot run the binary \"%s\".\n\n", Vec_StrArray(vCommand) );
|
||||
Vec_StrFree( vCommand );
|
||||
return 1;
|
||||
}
|
||||
fclose( pFile );
|
||||
|
|
@ -74,9 +74,9 @@ int CmdCommandLoad( Abc_Frame_t * pAbc, int argc, char ** argv )
|
|||
// run the command line
|
||||
if ( Util_SignalSystem( Vec_StrArray(vCommand) ) )
|
||||
{
|
||||
Vec_StrFree( vCommand );
|
||||
Abc_Print( -1, "The following command has returned non-zero exit status:\n" );
|
||||
Abc_Print( -1, "\"%s\"\n", Vec_StrArray(vCommand) );
|
||||
Vec_StrFree( vCommand );
|
||||
return 1;
|
||||
}
|
||||
Vec_StrFree( vCommand );
|
||||
|
|
|
|||
|
|
@ -373,7 +373,8 @@ Abc_Ntk_t * Io_ReadPlaNetwork( Extra_FileReader_t * p, int fZeros, int fBoth, in
|
|||
char Buffer[100];
|
||||
int nInputs = -1, nOutputs = -1, nProducts = -1;
|
||||
char * pCubeIn, * pCubeOut;
|
||||
int i, k, iLine, nDigits, nCubes;
|
||||
int i, k, iLine, nCubes;
|
||||
unsigned char nDigits;
|
||||
|
||||
// allocate the empty network
|
||||
pNtk = Abc_NtkStartRead( Extra_FileReaderGetFileName(p) );
|
||||
|
|
@ -445,7 +446,7 @@ Abc_Ntk_t * Io_ReadPlaNetwork( Extra_FileReader_t * p, int fZeros, int fBoth, in
|
|||
ABC_FREE( ppSops );
|
||||
return NULL;
|
||||
}
|
||||
nDigits = Abc_Base10Log( nInputs );
|
||||
nDigits = (unsigned char)Abc_Base10Log( nInputs );
|
||||
for ( i = 0; i < nInputs; i++ )
|
||||
{
|
||||
sprintf( Buffer, "x%0*d", nDigits, i );
|
||||
|
|
@ -462,7 +463,7 @@ Abc_Ntk_t * Io_ReadPlaNetwork( Extra_FileReader_t * p, int fZeros, int fBoth, in
|
|||
ABC_FREE( ppSops );
|
||||
return NULL;
|
||||
}
|
||||
nDigits = Abc_Base10Log( nOutputs );
|
||||
nDigits = (unsigned char)Abc_Base10Log( nOutputs );
|
||||
for ( i = 0; i < nOutputs; i++ )
|
||||
{
|
||||
sprintf( Buffer, "z%0*d", nDigits, i );
|
||||
|
|
|
|||
|
|
@ -367,7 +367,8 @@ Wlc_Ntk_t * Wlc_NtkFromNdr( void * pData )
|
|||
{
|
||||
Ndr_Data_t * p = (Ndr_Data_t *)pData;
|
||||
Wlc_Obj_t * pObj; Vec_Int_t * vName2Obj, * vFanins = Vec_IntAlloc( 100 );
|
||||
int Mod = 2, i, k, Obj, * pArray, nDigits, fFound, NameId, NameIdMax;
|
||||
int Mod = 2, i, k, Obj, * pArray, fFound, NameId, NameIdMax;
|
||||
unsigned char nDigits;
|
||||
Vec_Wrd_t * vTruths = NULL; int nTruths[2] = {0};
|
||||
Wlc_Ntk_t * pTemp, * pNtk = Wlc_NtkAlloc( "top", Ndr_DataObjNum(p, Mod)+1 );
|
||||
Wlc_NtkCheckIntegrity( pData );
|
||||
|
|
@ -488,7 +489,7 @@ Wlc_Ntk_t * Wlc_NtkFromNdr( void * pData )
|
|||
Vec_IntFree(vName2Obj);
|
||||
// create fake object names
|
||||
NameIdMax = Vec_IntFindMax(&pNtk->vNameIds);
|
||||
nDigits = Abc_Base10Log( NameIdMax+1 );
|
||||
nDigits = (unsigned char)Abc_Base10Log( NameIdMax+1 );
|
||||
pNtk->pManName = Abc_NamStart( NameIdMax+1, 10 );
|
||||
for ( i = 1; i <= NameIdMax; i++ )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1293,9 +1293,9 @@ void Wlc_NtkShortNames( Wlc_Ntk_t * p )
|
|||
{
|
||||
Wlc_Obj_t * pObj;
|
||||
char pBuffer[100];
|
||||
int nDigits, NameId, fFound, i;
|
||||
int NameId, fFound, i;
|
||||
int nFlops = Wlc_NtkCoNum(p) - Wlc_NtkPoNum(p);
|
||||
nDigits = Abc_Base10Log( nFlops );
|
||||
unsigned char nDigits = (unsigned char)Abc_Base10Log( nFlops );
|
||||
Wlc_NtkForEachCo( p, pObj, i )
|
||||
{
|
||||
if ( Wlc_ObjIsPo(pObj) )
|
||||
|
|
|
|||
|
|
@ -1711,7 +1711,7 @@ void Mio_LibraryShortNames( Mio_Library_t * pLib )
|
|||
{
|
||||
char Buffer[10000];
|
||||
Mio_Gate_t * pGate; Mio_Pin_t * pPin;
|
||||
int c = 0, i, nDigits = Abc_Base10Log( Mio_LibraryReadGateNum(pLib) );
|
||||
int c = 0, i; unsigned char nDigits = (unsigned char)Abc_Base10Log( Mio_LibraryReadGateNum(pLib) );
|
||||
// itereate through classes
|
||||
Mio_LibraryForEachGate( pLib, pGate )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3117,7 +3117,7 @@ Gia_Man_t * Gia_ManDupMini( Gia_Man_t * p, Vec_Int_t * vIns, Vec_Int_t * vDivs,
|
|||
Gia_Man_t * pNew;
|
||||
Gia_Obj_t * pObj; int i, k;
|
||||
Vec_Int_t * vCopies = Vec_IntStartFull( Mini_AigNodeNum(pMini) );
|
||||
int nPis = Mini_AigPiNum(pMini);
|
||||
//int nPis = Mini_AigPiNum(pMini);
|
||||
Vec_IntWriteEntry( vCopies, 0, 0 );
|
||||
assert( Mini_AigPiNum(pMini) == Vec_IntSize(vIns)+Vec_IntSize(vDivs) );
|
||||
assert( Mini_AigPoNum(pMini) == Vec_IntSize(vOuts) );
|
||||
|
|
|
|||
Loading…
Reference in New Issue