fix some warnings

This commit is contained in:
Wolfgang Thaller 2018-12-25 22:20:00 +01:00
parent 2e2a734403
commit a726045d54
7 changed files with 10 additions and 5 deletions

View File

@ -211,6 +211,9 @@ void Section::FixRelocs(bool allowDirectCodeRefs)
case SectionKind::bss:
relocBase = RelocBase::bss;
break;
case SectionKind::undefined:
assert(false);
break;
}
rela.relocBase = relocBase;

View File

@ -1,6 +1,7 @@
#include "ReliableStream.h"
#include <iterator>
#include "CRC32.h"
#include <cassert>
using std::begin;
using std::end;
@ -460,4 +461,5 @@ size_t ReliableStream::onReceive(const uint8_t* p, size_t n)
}
break;
}
assert(false);
}

View File

@ -45,7 +45,7 @@ class ReliableStream : public StreamWrapper
bool resetResponse = false;
bool flushRequested = false;
virtual size_t onReceive(const uint8_t* p, size_t n);
virtual size_t onReceive(const uint8_t* p, size_t n) override;
public:
explicit ReliableStream(Stream* stream);
void reset(int sendReset);

View File

@ -84,4 +84,5 @@ StreamWrapper& StreamWrapper::operator=(StreamWrapper&& other)
if(underlying_)
underlying_->setListener(this);
other.underlying_ = nullptr;
return *this;
}

View File

@ -47,6 +47,8 @@ class Field
public:
yy::location location;
virtual ~Field() = default;
virtual bool needsValue() { return true; }
virtual void compile(ExprPtr expr, ResourceCompiler *compiler, bool prePass) = 0;

View File

@ -166,7 +166,7 @@ RezLexer::WaveToken RezLexer::nextWave()
return tok;
}
}
catch(preprocess_exception e)
catch(const preprocess_exception& e)
{
curFile = e.file_name();
auto yypos = yy::position(&curFile, e.line_no(), e.column_no());

View File

@ -52,9 +52,6 @@
# define rwlock_unlock(lock) ((void) (lock))
#endif /* USE_LOCKS */
/* gettext helper macro. */
#define N_(Str) Str
/* Compiler-specific definitions. */
//#define strong_alias(name, aliasname) \
// extern __typeof (name) aliasname __attribute__ ((alias (#name)));