Commit 216fc33a by Alan Mishchenko

Fixed compiler warnings.

parent 8982bf58
......@@ -176,7 +176,7 @@ char * Abc_FileRead( char * pFileName )
{
FILE * pFile;
char * pBuffer;
int nFileSize;
int nFileSize, RetValue;
pFile = fopen( pFileName, "rb" );
if ( pFile == NULL )
{
......@@ -190,7 +190,7 @@ char * Abc_FileRead( char * pFileName )
rewind( pFile );
// load the contents of the file into memory
pBuffer = (char *)malloc( nFileSize + 3 );
fread( pBuffer, nFileSize, 1, pFile );
RetValue = fread( pBuffer, nFileSize, 1, pFile );
// add several empty lines at the end
// (these will be used to signal the end of parsing)
pBuffer[ nFileSize + 0] = '\n';
......
......@@ -89,7 +89,7 @@ void Sat_SolverWriteDimacs( sat_solver * p, char * pFileName, lit* assumpBegin,
return;
}
// fprintf( pFile, "c CNF generated by ABC on %s\n", Extra_TimeStamp() );
fprintf( pFile, "p cnf %d %d\n", p->size, Sat_MemEntryNum(&p->Mem, 0)+Sat_MemEntryNum(&p->Mem, 1)+nUnits+(assumpEnd-assumpBegin) );
fprintf( pFile, "p cnf %d %d\n", p->size, Sat_MemEntryNum(&p->Mem, 0)+Sat_MemEntryNum(&p->Mem, 1)+nUnits+(int)(assumpEnd-assumpBegin) );
// write the original clauses
Sat_MemForEachClause( pMem, c, i, k )
......@@ -141,7 +141,7 @@ void Sat_Solver2WriteDimacs( sat_solver2 * p, char * pFileName, lit* assumpBegin
return;
}
// fprintf( pFile, "c CNF generated by ABC on %s\n", Extra_TimeStamp() );
fprintf( pFile, "p cnf %d %d\n", p->size, Sat_MemEntryNum(&p->Mem, 0)+Sat_MemEntryNum(&p->Mem, 1)+nUnits+(assumpEnd-assumpBegin) );
fprintf( pFile, "p cnf %d %d\n", p->size, Sat_MemEntryNum(&p->Mem, 0)+Sat_MemEntryNum(&p->Mem, 1)+nUnits+(int)(assumpEnd-assumpBegin) );
// write the original clauses
Sat_MemForEachClause2( pMem, c, i, k )
......
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