Commit 2c70e77d authored by rdubner's avatar rdubner

Put '-Wall' into Makefile; eliminate all resulting warnings

parent f72db328
CXXFLAGS = -std=c++11
CXXFLAGS = -std=c++11 -Wall
export CXXFLAGS
# Don't try to build the optfde01 example until the cobcd script
......
......@@ -123,7 +123,7 @@ FILENAME::Decode(const string &filename_)
// Convert backslashes to frontslashes in the file name
filename = Replace(filename,'\\',delimiter);
if(filename.size() EQ 0 OR filename.size() >= 1 AND filename[0] != delimiter) {
if( filename.size() EQ 0 OR (filename.size() >= 1 AND filename[0] != delimiter) ) {
// The filename doesn't start with a slash, so it is a relative path.
// Incorporate the default path:
filename = default_path + filename;
......
......@@ -60,10 +60,10 @@ StripQuotes(const string &s)
{
PROFILER;
string retval=s;
if(retval.size() >= 1 AND retval[retval.size()-1] EQ '"' OR retval[retval.size()-1] EQ '\'') {
if( (retval.size() >= 1 AND retval[retval.size()-1] EQ '"') OR retval[retval.size()-1] EQ '\'') {
retval = retval.substr(0,retval.size()-1);
}
if(retval.size() >= 1 AND retval[0] EQ '"' OR retval[0] EQ '\'') {
if( (retval.size() >= 1 AND retval[0] EQ '"') OR retval[0] EQ '\'') {
retval = retval.substr(1);
}
return retval;
......
......@@ -125,7 +125,7 @@ FILENAME::Decode(const string &filename_)
// Convert backslashes to frontslashes in the file name
filename = Replace(filename,'\\',delimiter);
if(filename.size() EQ 0 OR filename.size() >= 1 AND filename[0] != delimiter) {
if( filename.size() EQ 0 OR (filename.size() >= 1 AND filename[0] != delimiter) ) {
// The filename doesn't start with a slash, so it is a relative path.
// Incorporate the default path:
filename = default_path + filename;
......
......@@ -76,10 +76,10 @@ StripQuotes(const string &s)
{
PROFILER;
string retval=s;
if(retval.size() >= 1 AND retval[retval.size()-1] EQ '"' OR retval[retval.size()-1] EQ '\'') {
if( (retval.size() >= 1 AND retval[retval.size()-1] EQ '"') OR retval[retval.size()-1] EQ '\'' ) {
retval = retval.substr(0,retval.size()-1);
}
if(retval.size() >= 1 AND retval[0] EQ '"' OR retval[0] EQ '\'') {
if( (retval.size() >= 1 AND retval[0] EQ '"') OR retval[0] EQ '\'') {
retval = retval.substr(1);
}
return retval;
......
......@@ -49,11 +49,11 @@ VAR_NODE::VAR_NODE()
parent = nullptr;
data_description_index = NO_INDEX;
int best_size = 0;
int attr_type = 0;
int attr_digits = 0;
int attr_scale = 0;
int attr_flags = 0;
best_size = 0;
attr_type = 0;
attr_digits = 0;
attr_scale = 0;
attr_flags = 0;
}
void
......@@ -630,7 +630,7 @@ VARIABLE_TREE::DumpNode(ostream &sout, const VAR_NODE *node)
{
if( node->level EQ LEVEL_01
OR node->level EQ LEVEL_FILE // Special processing for FILE record
OR node->level EQ LEVEL_77 AND current_level_in_dump != 77 ) {
OR (node->level EQ LEVEL_77 AND current_level_in_dump != 77) ) {
sout << endl;
}
sout.width(5);
......
......@@ -259,43 +259,5 @@ public:
return *flat_list[i];
}
int
GetSize(int i) const
{
int retval = 0;
size_t index = flat_list[i]->data_description_index;
return retval;
}
int
GetAttrType(int i) const
{
int retval = 0;
return retval;
}
int
GetAttrDigits(int i) const
{
int retval = 0;
return retval;
}
int
GetAttrScale(int i) const
{
int retval = 0;
return retval;
}
int
GetAttrFlags(int i) const
{
int retval = 0;
return retval;
}
friend DATA_DESCRIPTIONS;
};
\ No newline at end of file
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