Commit 5f163c01 by Alan Mishchenko

Fixing broken build and compiler warnings.

parent 61a88f16
......@@ -236,7 +236,7 @@ Vec_Int_t * Iso_StoCollectInfo( Iso_Sto_t * p, Aig_Obj_t * pPo )
if ( fVerboseShow )
Vec_IntForEachEntry( vInfo, Entry, i )
{
Iso_Dat2_t Data = { Entry & 0xFFFF };
Iso_Dat2_t Data = { (unsigned)Entry & 0xFFFF };
Iso_Dat_t * pData = (Iso_Dat_t *)&Data;
printf( "%6d : ", i );
......
......@@ -1015,7 +1015,7 @@ void Acb_NtkRunSim( char * pFileName[4], int nWords, int nBeam, int LevL, int Le
{
extern int Gia_Sim4Try( char * pFileName0, char * pFileName1, char * pFileName2, int nWords, int nBeam, int LevL, int LevU, int fOrder, int fFancy, int fUseBuf, int fVerbose );
extern void Acb_NtkRunEco( char * pFileNames[4], int fCheck, int fRandom, int fVerbose, int fVeryVerbose );
char * pFileNames[4] = { pFileName[2], pFileName[1], fUseWeights ? "weights.txt" : NULL, pFileName[2] };
char * pFileNames[4] = { pFileName[2], pFileName[1], fUseWeights ? (char *)"weights.txt" : NULL, pFileName[2] };
if ( Gia_Sim4Try( pFileName[0], pFileName[1], pFileName[2], nWords, nBeam, LevL, LevU, fOrder, fFancy, fUseBuf, fVerbose ) )
Acb_NtkRunEco( pFileNames, 1, fRandom, fVerbose, fVeryVerbose );
}
......
......@@ -489,7 +489,7 @@ static inline void Wlc_NtkPrintDistribAddOne( Vec_Ptr_t * vTypes, Vec_Ptr_t * vO
{
Vec_Wrd_t * vType = (Vec_Wrd_t *)Vec_PtrEntry( vTypes, Type );
Vec_Wrd_t * vOccur = (Vec_Wrd_t *)Vec_PtrEntry( vOccurs, Type );
word Entry = 0; int i;
word Entry; int i;
Vec_WrdForEachEntry( vType, Entry, i )
if ( Entry == Sign )
{
......@@ -513,7 +513,7 @@ void Wlc_NtkPrintDistrib( Wlc_Ntk_t * p, int fTwoSides, int fVerbose )
Wlc_Obj_t * pObj, * pObjRange = NULL; int nCountRange = 0;
Vec_Ptr_t * vTypes, * vOccurs;
Vec_Int_t * vAnds = Vec_IntStart( WLC_OBJ_NUMBER );
word Sign;
word Sign = 0;
int i, k, s, s0, s1;
if ( Wlc_NtkPoNum(p) != 2 )
fTwoSides = 0;
......
......@@ -922,7 +922,7 @@ void Gia_ManCountCareBits( Gia_Man_t * p, Vec_Wec_t * vPats )
unsigned char * Mnist_ReadImages1_()
{
int Size = 60000 * 28 * 28 + 16;
unsigned char * pData = malloc( Size );
unsigned char * pData = (unsigned char *)malloc( Size );
FILE * pFile = fopen( "train-images.idx3-ubyte", "rb" );
int RetValue = fread( pData, 1, Size, pFile );
assert( RetValue == Size );
......
......@@ -1719,7 +1719,7 @@ finish:
// dump the test suite
if ( pPars->fDump )
{
char * pFileName = p->pSpec ? Extra_FileNameGenericAppend(p->pSpec, "_tests.txt") : "tests.txt";
char * pFileName = p->pSpec ? Extra_FileNameGenericAppend(p->pSpec, "_tests.txt") : (char *)"tests.txt";
if ( pPars->fDumpDelay && pPars->Algo == 1 )
{
Gia_ManDumpTestsDelay( vTests, Iter, pFileName, p );
......@@ -1834,7 +1834,7 @@ finish:
if ( pPars->fDumpUntest && status == l_True )
{
abctime clk = Abc_Clock();
char * pFileName = p->pSpec ? Extra_FileNameGenericAppend(p->pSpec, "_untest.txt") : "untest.txt";
char * pFileName = p->pSpec ? Extra_FileNameGenericAppend(p->pSpec, "_untest.txt") : (char *)"untest.txt";
int nUntests = Gia_ManDumpUntests( pM, pCnf, pSat, nFuncVars, pFileName, pPars->fVerbose );
if ( p == pG )
printf( "Dumped %d untestable multiple faults into file \"%s\". ", nUntests, pFileName );
......
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