Commit 9f46984c by Alan Mishchenko

Compiler warnings.

parent 534ebbc7
...@@ -171,9 +171,9 @@ static void Mini_AigDump( Mini_Aig_t * p, char * pFileName ) ...@@ -171,9 +171,9 @@ static void Mini_AigDump( Mini_Aig_t * p, char * pFileName )
printf( "Cannot open file for writing \"%s\".\n", pFileName ); printf( "Cannot open file for writing \"%s\".\n", pFileName );
return; return;
} }
RetValue = fwrite( &p->nSize, sizeof(int), 1, pFile ); RetValue = (int)fwrite( &p->nSize, sizeof(int), 1, pFile );
RetValue = fwrite( &p->nRegs, sizeof(int), 1, pFile ); RetValue = (int)fwrite( &p->nRegs, sizeof(int), 1, pFile );
RetValue = fwrite( p->pArray, sizeof(int), p->nSize, pFile ); RetValue = (int)fwrite( p->pArray, sizeof(int), p->nSize, pFile );
fclose( pFile ); fclose( pFile );
} }
static Mini_Aig_t * Mini_AigLoad( char * pFileName ) static Mini_Aig_t * Mini_AigLoad( char * pFileName )
...@@ -187,12 +187,12 @@ static Mini_Aig_t * Mini_AigLoad( char * pFileName ) ...@@ -187,12 +187,12 @@ static Mini_Aig_t * Mini_AigLoad( char * pFileName )
printf( "Cannot open file for reading \"%s\".\n", pFileName ); printf( "Cannot open file for reading \"%s\".\n", pFileName );
return NULL; return NULL;
} }
RetValue = fread( &nSize, sizeof(int), 1, pFile ); RetValue = (int)fread( &nSize, sizeof(int), 1, pFile );
p = MINI_AIG_CALLOC( Mini_Aig_t, 1 ); p = MINI_AIG_CALLOC( Mini_Aig_t, 1 );
p->nSize = p->nCap = nSize; p->nSize = p->nCap = nSize;
p->pArray = MINI_AIG_ALLOC( int, p->nCap ); p->pArray = MINI_AIG_ALLOC( int, p->nCap );
RetValue = fread( &p->nRegs, sizeof(int), 1, pFile ); RetValue = (int)fread( &p->nRegs, sizeof(int), 1, pFile );
RetValue = fread( p->pArray, sizeof(int), p->nSize, pFile ); RetValue = (int)fread( p->pArray, sizeof(int), p->nSize, pFile );
fclose( pFile ); fclose( pFile );
return p; return p;
} }
......
...@@ -191,11 +191,11 @@ static void Mini_LutDump( Mini_Lut_t * p, char * pFileName ) ...@@ -191,11 +191,11 @@ static void Mini_LutDump( Mini_Lut_t * p, char * pFileName )
printf( "Cannot open file for writing \"%s\".\n", pFileName ); printf( "Cannot open file for writing \"%s\".\n", pFileName );
return; return;
} }
RetValue = fwrite( &p->nSize, sizeof(int), 1, pFile ); RetValue = (int)fwrite( &p->nSize, sizeof(int), 1, pFile );
RetValue = fwrite( &p->nRegs, sizeof(int), 1, pFile ); RetValue = (int)fwrite( &p->nRegs, sizeof(int), 1, pFile );
RetValue = fwrite( &p->LutSize, sizeof(int), 1, pFile ); RetValue = (int)fwrite( &p->LutSize, sizeof(int), 1, pFile );
RetValue = fwrite( p->pArray, sizeof(int), p->nSize * p->LutSize, pFile ); RetValue = (int)fwrite( p->pArray, sizeof(int), p->nSize * p->LutSize, pFile );
RetValue = fwrite( p->pTruths, sizeof(int), p->nSize * Mini_LutWordNum(p->LutSize), pFile ); RetValue = (int)fwrite( p->pTruths, sizeof(int), p->nSize * Mini_LutWordNum(p->LutSize), pFile );
fclose( pFile ); fclose( pFile );
} }
static Mini_Lut_t * Mini_LutLoad( char * pFileName ) static Mini_Lut_t * Mini_LutLoad( char * pFileName )
...@@ -209,15 +209,15 @@ static Mini_Lut_t * Mini_LutLoad( char * pFileName ) ...@@ -209,15 +209,15 @@ static Mini_Lut_t * Mini_LutLoad( char * pFileName )
printf( "Cannot open file for reading \"%s\".\n", pFileName ); printf( "Cannot open file for reading \"%s\".\n", pFileName );
return NULL; return NULL;
} }
RetValue = fread( &nSize, sizeof(int), 1, pFile ); RetValue = (int)fread( &nSize, sizeof(int), 1, pFile );
p = MINI_LUT_CALLOC( Mini_Lut_t, 1 ); p = MINI_LUT_CALLOC( Mini_Lut_t, 1 );
p->nSize = p->nCap = nSize; p->nSize = p->nCap = nSize;
RetValue = fread( &p->nRegs, sizeof(int), 1, pFile ); RetValue = (int)fread( &p->nRegs, sizeof(int), 1, pFile );
RetValue = fread( &p->LutSize, sizeof(int), 1, pFile ); RetValue = (int)fread( &p->LutSize, sizeof(int), 1, pFile );
p->pArray = MINI_LUT_ALLOC( int, p->nCap * p->LutSize ); p->pArray = MINI_LUT_ALLOC( int, p->nCap * p->LutSize );
p->pTruths = MINI_LUT_ALLOC( unsigned, p->nCap * Mini_LutWordNum(p->LutSize) ); p->pTruths = MINI_LUT_ALLOC( unsigned, p->nCap * Mini_LutWordNum(p->LutSize) );
RetValue = fread( p->pArray, sizeof(int), p->nCap * p->LutSize, pFile ); RetValue = (int)fread( p->pArray, sizeof(int), p->nCap * p->LutSize, pFile );
RetValue = fread( p->pTruths, sizeof(int), p->nCap * Mini_LutWordNum(p->LutSize), pFile ); RetValue = (int)fread( p->pTruths, sizeof(int), p->nCap * Mini_LutWordNum(p->LutSize), pFile );
fclose( pFile ); fclose( pFile );
return p; return p;
} }
......
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