mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-27 11:06:50 +01:00
fixed warnings reported by GCC 6.2
This commit is contained in:
@@ -107,8 +107,8 @@ IPv4AddressImpl::IPv4AddressImpl(const IPv4AddressImpl& addr)
|
|||||||
|
|
||||||
IPv4AddressImpl& IPv4AddressImpl::operator = (const IPv4AddressImpl& addr)
|
IPv4AddressImpl& IPv4AddressImpl::operator = (const IPv4AddressImpl& addr)
|
||||||
{
|
{
|
||||||
if (this == &addr)
|
if (this == &addr)
|
||||||
return *this;
|
return *this;
|
||||||
|
|
||||||
std::memcpy(&_addr, &addr._addr, sizeof(_addr));
|
std::memcpy(&_addr, &addr._addr, sizeof(_addr));
|
||||||
return *this;
|
return *this;
|
||||||
@@ -377,8 +377,8 @@ IPv6AddressImpl::IPv6AddressImpl(const IPv6AddressImpl& addr): _scope(addr._scop
|
|||||||
|
|
||||||
IPv6AddressImpl& IPv6AddressImpl::operator = (const IPv6AddressImpl& addr)
|
IPv6AddressImpl& IPv6AddressImpl::operator = (const IPv6AddressImpl& addr)
|
||||||
{
|
{
|
||||||
if (this == &addr)
|
if (this == &addr)
|
||||||
return *this;
|
return *this;
|
||||||
|
|
||||||
_scope = addr._scope;
|
_scope = addr._scope;
|
||||||
std::memcpy(&_addr, &addr._addr, sizeof(_addr));
|
std::memcpy(&_addr, &addr._addr, sizeof(_addr));
|
||||||
@@ -696,8 +696,8 @@ IPAddressImpl* IPv6AddressImpl::clone() const
|
|||||||
|
|
||||||
IPv6AddressImpl IPv6AddressImpl::operator & (const IPv6AddressImpl& addr) const
|
IPv6AddressImpl IPv6AddressImpl::operator & (const IPv6AddressImpl& addr) const
|
||||||
{
|
{
|
||||||
if (_scope != addr._scope)
|
if (_scope != addr._scope)
|
||||||
throw Poco::InvalidArgumentException("Scope ID of passed IPv6 address does not match with the source one.");
|
throw Poco::InvalidArgumentException("Scope ID of passed IPv6 address does not match with the source one.");
|
||||||
|
|
||||||
IPv6AddressImpl result(*this);
|
IPv6AddressImpl result(*this);
|
||||||
#ifdef POCO_OS_FAMILY_WINDOWS
|
#ifdef POCO_OS_FAMILY_WINDOWS
|
||||||
@@ -721,8 +721,8 @@ IPv6AddressImpl IPv6AddressImpl::operator & (const IPv6AddressImpl& addr) const
|
|||||||
|
|
||||||
IPv6AddressImpl IPv6AddressImpl::operator | (const IPv6AddressImpl& addr) const
|
IPv6AddressImpl IPv6AddressImpl::operator | (const IPv6AddressImpl& addr) const
|
||||||
{
|
{
|
||||||
if (_scope != addr._scope)
|
if (_scope != addr._scope)
|
||||||
throw Poco::InvalidArgumentException("Scope ID of passed IPv6 address does not match with the source one.");
|
throw Poco::InvalidArgumentException("Scope ID of passed IPv6 address does not match with the source one.");
|
||||||
|
|
||||||
IPv6AddressImpl result(*this);
|
IPv6AddressImpl result(*this);
|
||||||
#ifdef POCO_OS_FAMILY_WINDOWS
|
#ifdef POCO_OS_FAMILY_WINDOWS
|
||||||
@@ -746,8 +746,8 @@ IPv6AddressImpl IPv6AddressImpl::operator | (const IPv6AddressImpl& addr) const
|
|||||||
|
|
||||||
IPv6AddressImpl IPv6AddressImpl::operator ^ (const IPv6AddressImpl& addr) const
|
IPv6AddressImpl IPv6AddressImpl::operator ^ (const IPv6AddressImpl& addr) const
|
||||||
{
|
{
|
||||||
if (_scope != addr._scope)
|
if (_scope != addr._scope)
|
||||||
throw Poco::InvalidArgumentException("Scope ID of passed IPv6 address does not match with the source one.");
|
throw Poco::InvalidArgumentException("Scope ID of passed IPv6 address does not match with the source one.");
|
||||||
|
|
||||||
IPv6AddressImpl result(*this);
|
IPv6AddressImpl result(*this);
|
||||||
|
|
||||||
|
|||||||
@@ -174,7 +174,6 @@ int ZipStreamBuf::readFromDevice(char* buffer, std::streamsize length)
|
|||||||
// now push back the header to the stream, so that the ZipLocalFileHeader can read it
|
// now push back the header to the stream, so that the ZipLocalFileHeader can read it
|
||||||
Poco::Int32 size = static_cast<Poco::Int32>(nfo.getFullHeaderSize());
|
Poco::Int32 size = static_cast<Poco::Int32>(nfo.getFullHeaderSize());
|
||||||
_expectedCrc32 = nfo.getCRC32();
|
_expectedCrc32 = nfo.getCRC32();
|
||||||
const char* rawHeader = nfo.getRawHeader();
|
|
||||||
_pIstr->seekg(-size, std::ios::cur);
|
_pIstr->seekg(-size, std::ios::cur);
|
||||||
if (!_pIstr->good()) throw Poco::IOException("Failed to seek on input stream");
|
if (!_pIstr->good()) throw Poco::IOException("Failed to seek on input stream");
|
||||||
if (!crcValid())
|
if (!crcValid())
|
||||||
|
|||||||
Reference in New Issue
Block a user