Fixing compiler warning.

This commit is contained in:
Alan Mishchenko 2025-08-02 08:58:01 -07:00
parent 3aa8a4a639
commit aeef2c6692
1 changed files with 26 additions and 23 deletions

View File

@ -3593,6 +3593,8 @@ int IoCommandWriteNtk( Abc_Frame_t * pAbc, int argc, char **argv )
} }
if ( argc != globalUtilOptind + 1 ) if ( argc != globalUtilOptind + 1 )
goto usage; goto usage;
else
{
Abc_Obj_t * pObj, * pFanin; int i, k, nIds = 1; Abc_Obj_t * pObj, * pFanin; int i, k, nIds = 1;
int * pId = ABC_CALLOC( int, Abc_NtkObjNumMax(pAbc->pNtkCur) ); int * pId = ABC_CALLOC( int, Abc_NtkObjNumMax(pAbc->pNtkCur) );
Abc_NtkForEachCi( pAbc->pNtkCur, pObj, i ) Abc_NtkForEachCi( pAbc->pNtkCur, pObj, i )
@ -3617,6 +3619,7 @@ int IoCommandWriteNtk( Abc_Frame_t * pAbc, int argc, char **argv )
fprintf( pFile, "%d %d\n", pId[pObj->Id], pId[Abc_ObjFanin0(pObj)->Id] ); fprintf( pFile, "%d %d\n", pId[pObj->Id], pId[Abc_ObjFanin0(pObj)->Id] );
fclose( pFile ); fclose( pFile );
ABC_FREE( pId ); ABC_FREE( pId );
}
return 0; return 0;
usage: usage: