Commit 2d2e4f8d authored by rdubner's avatar rdubner

Minor changes to compile with GCC -O3

parent 8541856a
CXXFLAGS:=-std=c++11 -Wall CXXFLAGS:=-std=c++11 -Wall -O3
export CXXFLAGS export CXXFLAGS
DESTDIR ?=/usr/local DESTDIR ?=/usr/local
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#pragma once #pragma once
#define PROFILING // #define PROFILING
#if defined(PROFILING) #if defined(PROFILING)
......
...@@ -296,8 +296,11 @@ ReadEntireFile(const string &filename,WHOLEFILE &fd) ...@@ -296,8 +296,11 @@ ReadEntireFile(const string &filename,WHOLEFILE &fd)
fd.data = new char[fd.size]; fd.data = new char[fd.size];
// Read it in // Read it in
fread(fd.data,fd.size,1,f); size_t nread = fread(fd.data,fd.size,1,f);
fclose(f); if(nread >= 0) {
// This is always true, but it suppresses compiler warnings.
fclose(f);
}
fd.current_index=0; fd.current_index=0;
} }
...@@ -499,7 +502,7 @@ build(PARAMETERS &params, ...@@ -499,7 +502,7 @@ build(PARAMETERS &params,
// it's time to put a .loc in. // it's time to put a .loc in.
if(next_function_reference_index < (int)function_references.size() if(next_function_reference_index < (int)function_references.size()
&& i EQ function_references[next_function_reference_index] ) { && i EQ (int)function_references[next_function_reference_index] ) {
// We have found a match. // We have found a match.
next_function_reference_index += 1; next_function_reference_index += 1;
......
...@@ -189,7 +189,7 @@ ProcessDataStorage(ifstream &ifs, ...@@ -189,7 +189,7 @@ ProcessDataStorage(ifstream &ifs,
if( nfound != string::npos ) { if( nfound != string::npos ) {
nfound += 1; nfound += 1;
string c_symbol; string c_symbol;
char ch; char ch='\0';
while( nfound < input.length() ) { while( nfound < input.length() ) {
ch = input[nfound++]; ch = input[nfound++];
if( ch EQ '[' ) { if( ch EQ '[' ) {
......
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