Merge pull request #5 from matwey/master

fixed compiling for gcc 4.7
This commit is contained in:
fuCtor 2012-09-29 13:44:20 -07:00
commit fe6160eaed
7 changed files with 16 additions and 10 deletions

View File

@ -1,4 +1,6 @@
#include <stdio.h>
#include <QtCore/QCoreApplication> #include <QtCore/QCoreApplication>
#include "test.h" #include "test.h"
@ -31,6 +33,7 @@ int main(int argc, char *argv[])
Test test[1]; Test test[1];
Q_UNUSED(test);
return a.exec(); return a.exec();
} }

View File

@ -30,10 +30,10 @@ struct ClientExceptionCleaner
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
ClientPrivate::ClientPrivate( Client * q ) : ClientPrivate::ClientPrivate( Client * q ) :
pq_ptr(q) port(AMQPPORT)
, port(AMQPPORT)
, host(QString::fromLatin1(AMQPHOST)) , host(QString::fromLatin1(AMQPHOST))
, virtualHost(QString::fromLatin1(AMQPVHOST)) , virtualHost(QString::fromLatin1(AMQPVHOST))
, pq_ptr(q)
{ {
} }
@ -163,6 +163,7 @@ Queue * ClientPrivate::createQueue(int channelNumber, const QString &name )
void ClientPrivate::disconnect() void ClientPrivate::disconnect()
{ {
P_Q(QAMQP::Client); P_Q(QAMQP::Client);
Q_UNUSED(q);
if(network_->state() != QAbstractSocket::UnconnectedState) if(network_->state() != QAbstractSocket::UnconnectedState)
{ {
network_->QAMQP::Network::disconnect(); network_->QAMQP::Network::disconnect();

View File

@ -131,10 +131,10 @@ void QAMQP::Channel::setQOS( qint32 prefetchSize, quint16 prefetchCount )
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
ChannelPrivate::ChannelPrivate(Channel * q) ChannelPrivate::ChannelPrivate(Channel * q)
:pq_ptr(q) : number(0)
, number(0)
, opened(false) , opened(false)
, needOpen(true) , needOpen(true)
, pq_ptr(q)
{ {
} }

View File

@ -37,9 +37,9 @@ namespace QAMQP
ConnectionPrivate::ConnectionPrivate( Connection * q) ConnectionPrivate::ConnectionPrivate( Connection * q)
:pq_ptr(q) : closed_(false)
, closed_(false)
, connected(false) , connected(false)
, pq_ptr(q)
{ {
} }

View File

@ -7,7 +7,7 @@
#include <float.h> #include <float.h>
using namespace QAMQP::Frame; using namespace QAMQP::Frame;
Base::Base( Type type ) :type_(type), channel_(0), size_(0) {} Base::Base( Type type ) : size_(0), type_(type), channel_(0) {}
Base::Base( QDataStream& raw ) Base::Base( QDataStream& raw )
{ {
@ -64,7 +64,7 @@ void QAMQP::Frame::Base::readHeader( QDataStream & stream )
void QAMQP::Frame::Base::readEnd( QDataStream & stream ) void QAMQP::Frame::Base::readEnd( QDataStream & stream )
{ {
char end_ = 0; unsigned char end_ = 0;
stream.readRawData(reinterpret_cast<char*>(&end_), sizeof(end_)); stream.readRawData(reinterpret_cast<char*>(&end_), sizeof(end_));
if(end_ != AMQP_FRAME_END ) if(end_ != AMQP_FRAME_END )
{ {
@ -472,6 +472,7 @@ void QAMQP::Frame::writeField( QDataStream &s, const QVariant & value )
case QVariant::List: case QVariant::List:
type = 'A'; type = 'A';
break; break;
default:;
} }
if(type) if(type)

View File

@ -195,6 +195,7 @@ void QAMQP::Network::initSocket( bool ssl /*= false*/ )
void QAMQP::Network::sslErrors( const QList<QSslError> & errors ) void QAMQP::Network::sslErrors( const QList<QSslError> & errors )
{ {
Q_UNUSED(errors);
static_cast<QSslSocket*>(socket_.data())->ignoreSslErrors(); static_cast<QSslSocket*>(socket_.data())->ignoreSslErrors();
} }

View File

@ -180,8 +180,8 @@ QueuePrivate::QueuePrivate(Queue * q)
:ChannelPrivate(q) :ChannelPrivate(q)
, deleyedDeclare(false) , deleyedDeclare(false)
, declared(false) , declared(false)
, recievingMessage(false)
, noAck(true) , noAck(true)
, recievingMessage(false)
{ {
} }