Compiler warnings.

This commit is contained in:
Alan Mishchenko 2023-02-28 15:40:06 +07:00
parent b57b546494
commit 622d142794
10 changed files with 18 additions and 18 deletions

View File

@ -3439,7 +3439,7 @@ int Gia_ManRelCheck( Gia_Man_t * p, Vec_Int_t * vIns, Vec_Int_t * vDivs, Vec_Int
void Gia_ManRelCompute( Gia_Man_t * p, Vec_Int_t * vIns, Vec_Int_t * vDivs, Vec_Int_t * vOuts, Vec_Wrd_t ** pvSimsIn, Vec_Wrd_t ** pvSimsOut )
{
Vec_Wrd_t * vSims, * vRel;
Vec_Wrd_t * vSimsDiv = NULL, * vSimsOut = NULL;
//Vec_Wrd_t * vSimsDiv = NULL, * vSimsOut = NULL;
Vec_WrdFreeP( &p->vSimsPi );
p->vSimsPi = Vec_WrdStartTruthTables( Gia_ManCiNum(p) );

View File

@ -45,17 +45,17 @@ ABC_NAMESPACE_IMPL_START
***********************************************************************/
char * Saig_ObjName( Aig_Man_t * p, Aig_Obj_t * pObj )
{
static char Buffer[16];
static char Buffer[100];
if ( Aig_ObjIsNode(pObj) || Aig_ObjIsConst1(pObj) )
sprintf( Buffer, "n%0*d", Abc_Base10Log(Aig_ManObjNumMax(p)), Aig_ObjId(pObj) );
sprintf( Buffer, "n%0*d", (unsigned char)Abc_Base10Log(Aig_ManObjNumMax(p)), Aig_ObjId(pObj) );
else if ( Saig_ObjIsPi(p, pObj) )
sprintf( Buffer, "pi%0*d", Abc_Base10Log(Saig_ManPiNum(p)), Aig_ObjCioId(pObj) );
sprintf( Buffer, "pi%0*d", (unsigned char)Abc_Base10Log(Saig_ManPiNum(p)), Aig_ObjCioId(pObj) );
else if ( Saig_ObjIsPo(p, pObj) )
sprintf( Buffer, "po%0*d", Abc_Base10Log(Saig_ManPoNum(p)), Aig_ObjCioId(pObj) );
sprintf( Buffer, "po%0*d", (unsigned char)Abc_Base10Log(Saig_ManPoNum(p)), Aig_ObjCioId(pObj) );
else if ( Saig_ObjIsLo(p, pObj) )
sprintf( Buffer, "lo%0*d", Abc_Base10Log(Saig_ManRegNum(p)), Aig_ObjCioId(pObj) - Saig_ManPiNum(p) );
sprintf( Buffer, "lo%0*d", (unsigned char)Abc_Base10Log(Saig_ManRegNum(p)), Aig_ObjCioId(pObj) - Saig_ManPiNum(p) );
else if ( Saig_ObjIsLi(p, pObj) )
sprintf( Buffer, "li%0*d", Abc_Base10Log(Saig_ManRegNum(p)), Aig_ObjCioId(pObj) - Saig_ManPoNum(p) );
sprintf( Buffer, "li%0*d", (unsigned char)Abc_Base10Log(Saig_ManRegNum(p)), Aig_ObjCioId(pObj) - Saig_ManPoNum(p) );
else
assert( 0 );
return Buffer;

View File

@ -30990,7 +30990,7 @@ int Abc_CommandAbc9Put( Abc_Frame_t * pAbc, int argc, char ** argv )
// transfer PO names to pNtk
if ( pAbc->pGia->vNamesOut )
{
char pSuffix[100];
char pSuffix[1000];
Abc_Obj_t * pObj; int i;
unsigned char nDigits = (unsigned char)Abc_Base10Log( Abc_NtkLatchNum(pNtk) );
Abc_NtkForEachCo( pNtk, pObj, i ) {

View File

@ -370,7 +370,7 @@ Abc_Ntk_t * Io_ReadPlaNetwork( Extra_FileReader_t * p, int fZeros, int fBoth, in
Abc_Ntk_t * pNtk;
Abc_Obj_t * pTermPi, * pTermPo, * pNode;
Vec_Str_t ** ppSops = NULL;
char Buffer[100];
char Buffer[1000];
int nInputs = -1, nOutputs = -1, nProducts = -1;
char * pCubeIn, * pCubeOut;
int i, k, iLine, nCubes;

View File

@ -493,7 +493,7 @@ Wlc_Ntk_t * Wlc_NtkFromNdr( void * pData )
pNtk->pManName = Abc_NamStart( NameIdMax+1, 10 );
for ( i = 1; i <= NameIdMax; i++ )
{
char pName[100]; sprintf( pName, "s%0*d", nDigits, i );
char pName[1000]; sprintf( pName, "s%0*d", nDigits, i );
NameId = Abc_NamStrFindOrAdd( pNtk->pManName, pName, &fFound );
assert( !fFound && i == NameId );
}

View File

@ -1292,7 +1292,7 @@ Wlc_Ntk_t * Wlc_NtkDupSingleNodes( Wlc_Ntk_t * p )
void Wlc_NtkShortNames( Wlc_Ntk_t * p )
{
Wlc_Obj_t * pObj;
char pBuffer[100];
char pBuffer[1000];
int NameId, fFound, i;
int nFlops = Wlc_NtkCoNum(p) - Wlc_NtkPoNum(p);
unsigned char nDigits = (unsigned char)Abc_Base10Log( nFlops );

View File

@ -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[100]; sprintf( pName, "s%0*d", nDigits, i );
char pName[1000]; sprintf( pName, "s%0*d", nDigits, i );
NameId = Abc_NamStrFindOrAdd( pNtk->pManName, pName, &fFound );
assert( !fFound && i == NameId );
}

View File

@ -182,7 +182,7 @@ void Kit_IsopResubInt( Kit_Graph_t * pGraph, Vec_Int_t * vRes )
Vec_IntPush( vRes, 4 + Abc_Var2Lit(Kit_GraphVarInt(pGraph), Kit_GraphIsComplement(pGraph)) );
else
{
Kit_Node_t * pNode; int i;
Kit_Node_t * pNode = NULL; int i;
Kit_GraphForEachNode( pGraph, pNode, i )
{
Kit_Node_t * pFan0 = Kit_GraphNodeFanin0( pGraph, pNode );

View File

@ -91,7 +91,7 @@ struct If_DsdMan_t_
Vec_Mem_t * vTtMem[IF_MAX_FUNC_LUTSIZE+1]; // truth table memory and hash table
Vec_Ptr_t * vTtDecs[IF_MAX_FUNC_LUTSIZE+1]; // truth table decompositions
Vec_Wec_t * vIsops[IF_MAX_FUNC_LUTSIZE+1]; // ISOP for each function
int * pSched[IF_MAX_FUNC_LUTSIZE]; // grey code schedules
int * pSched[IF_MAX_FUNC_LUTSIZE+1]; // grey code schedules
int nTtBits; // the number of truth table bits
int nConfigWords; // the number of words for config data per node
Vec_Wrd_t * vConfigs; // permutations

View File

@ -197,11 +197,11 @@ void Abc_SclShortNames( SC_Lib * p )
char Buffer[10000];
SC_Cell * pClass, * pCell; SC_Pin * pPin;
int i, k, n, nClasses = Abc_SclLibClassNum(p);
int nDigits = Abc_Base10Log( nClasses );
unsigned char nDigits = (unsigned char)Abc_Base10Log( nClasses );
// itereate through classes
SC_LibForEachCellClass( p, pClass, i )
{
int nDigits2 = Abc_Base10Log( Abc_SclClassCellNum(pClass) );
unsigned char nDigits2 = (unsigned char)Abc_Base10Log( Abc_SclClassCellNum(pClass) );
SC_RingForEachCell( pClass, pCell, k )
{
ABC_FREE( pCell->pName );
@ -214,13 +214,13 @@ void Abc_SclShortNames( SC_Lib * p )
SC_CellForEachPinIn( pCell, pPin, n )
{
ABC_FREE( pPin->pName );
sprintf( Buffer, "%c", 'a'+n );
sprintf( Buffer, "%c", (char)('a'+n) );
pPin->pName = Abc_UtilStrsav( Buffer );
}
SC_CellForEachPinOut( pCell, pPin, n )
{
ABC_FREE( pPin->pName );
sprintf( Buffer, "%c", 'z'-n+pCell->n_inputs );
sprintf( Buffer, "%c", (char)('z'-n+pCell->n_inputs) );
pPin->pName = Abc_UtilStrsav( Buffer );
}
}