Commit 8efb94d6 authored by Andrea Zoli's avatar Andrea Zoli
Browse files

Fix -Wextra warnings.

parent 281529a1
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -82,6 +82,15 @@ typedef unsigned int dword;
#define CONFIG_MAXNUMBER_OFCONFIGILES 20000
#define CONFIG_MAXNUMBEROFLINES_OFCONFIGILES 100000

/// utility function to ignore unused function parameters.
#ifdef HAS_MOVE_SEMANTICS
template <typename T>
void UNUSED(T &&)
{ }
#else
#define UNUSED(expr) do { (void)(expr); } while (0)
#endif

/// typedef bool boolean;

using namespace std;
+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ class SharedPtr
	SharedPtr() : p(0), c(0) {}
	explicit SharedPtr(T* s) : p(s), c(new unsigned(1)) {}

	SharedPtr(void* null) : p(0), c(0) {}
	SharedPtr(void*) : p(0), c(0) {}

	SharedPtr(const SharedPtr& s) : p(s.p), c(s.c) { if(c) ++*c; }

+2 −0
Original line number Diff line number Diff line
@@ -164,6 +164,8 @@ ByteStreamPtr PacketLib::ByteStream::compress(enum CompressionAlgorithms algorit
ByteStreamPtr PacketLib::ByteStream::decompress(enum CompressionAlgorithms algorithmType, byte compressionLevel, dword dmax) {
	ByteStreamPtr b;

	UNUSED(compressionLevel);

	switch(algorithmType)
	{
		case NONE:
+1 −0
Original line number Diff line number Diff line
@@ -79,6 +79,7 @@ bool OutputSerial::writeByteStream(ByteStreamPtr b) throw(PacketExceptionIO*)

bool OutputSerial::writeString(const char* str) throw(PacketExceptionIO*)
{
	UNUSED(str);
    /*   if(!isclosed)
           file->writeString(str);
       else
+2 −0
Original line number Diff line number Diff line
@@ -72,5 +72,7 @@ bool OutputSocketClient::writeByteStream(ByteStreamPtr b) throw(PacketExceptionI

bool OutputSocketClient::writeString(const char* str) throw(PacketExceptionIO*)
{
	UNUSED(str);

    throw new PacketExceptionIO("Method not implemented");
}
Loading