author | zecke <zecke> | 2004-08-23 22:36:53 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-08-23 22:36:53 (UTC) |
commit | f8f1d4f340b591f21cd7c10259da1241ecf69dd9 (patch) (side-by-side diff) | |
tree | 1dd1f56716000d7952c31340e4b299c5635cbade | |
parent | bf5a6236fe0f0ab42075a6a20539b7fd856ddcdd (diff) | |
download | opie-f8f1d4f340b591f21cd7c10259da1241ecf69dd9.zip opie-f8f1d4f340b591f21cd7c10259da1241ecf69dd9.tar.gz opie-f8f1d4f340b591f21cd7c10259da1241ecf69dd9.tar.bz2 |
Fix warnings raised by the compiler
-rw-r--r-- | libopie2/opienet/onetwork.cpp | 12 | ||||
-rw-r--r-- | libopie2/opienet/opcap.cpp | 23 |
2 files changed, 18 insertions, 17 deletions
diff --git a/libopie2/opienet/onetwork.cpp b/libopie2/opienet/onetwork.cpp index 171a2bc..591681c 100644 --- a/libopie2/opienet/onetwork.cpp +++ b/libopie2/opienet/onetwork.cpp @@ -825,33 +825,33 @@ void OWirelessNetworkInterface::setPrivate( const QString& call, int numargs, .. memset( &_iwr, 0, sizeof _iwr ); va_list argp; va_start( argp, numargs ); for ( int i = 0; i < numargs; ++i ) { priv->setParameter( i, va_arg( argp, int ) ); } va_end( argp ); priv->invoke(); } -void OWirelessNetworkInterface::getPrivate( const QString& call ) +void OWirelessNetworkInterface::getPrivate( const QString& ) { oerr << "OWirelessNetworkInterface::getPrivate() is not implemented yet." << oendl; } bool OWirelessNetworkInterface::hasPrivate( const QString& call ) { - return child( (const char*) call ); + return child( call.local8Bit() ); } QString OWirelessNetworkInterface::SSID() const { char str[IW_ESSID_MAX_SIZE]; _iwr.u.essid.pointer = &str[0]; _iwr.u.essid.length = IW_ESSID_MAX_SIZE; if ( !wioctl( SIOCGIWESSID ) ) { return "<unknown>"; } @@ -1003,26 +1003,26 @@ int OWirelessNetworkInterface::signalStrength() const ::memset( &stat, 0, sizeof stat ); _iwr.u.data.pointer = (char*) &stat; _iwr.u.data.flags = 0; _iwr.u.data.length = sizeof stat; if ( !wioctl( SIOCGIWSTATS ) ) { return -1; } int max = _range.max_qual.qual; int cur = stat.qual.qual; - int lev = stat.qual.level; //FIXME: Do something with them? - int noi = stat.qual.noise; //FIXME: Do something with them? +// int lev = stat.qual.level; //FIXME: Do something with them? +// int noi = stat.qual.noise; //FIXME: Do something with them? return max != 0 ? cur*100/max: -1; } bool OWirelessNetworkInterface::wioctl( int call, struct iwreq& iwreq ) const { #ifndef NODEBUG int result = ::ioctl( _sfd, call, &iwreq ); if ( result == -1 ) @@ -1062,46 +1062,46 @@ OMonitoringInterface::~OMonitoringInterface() void OMonitoringInterface::setChannel( int c ) { // use standard WE channel switching protocol memset( &_if->_iwr, 0, sizeof( struct iwreq ) ); _if->_iwr.u.freq.m = c; _if->_iwr.u.freq.e = 0; _if->wioctl( SIOCSIWFREQ ); } -void OMonitoringInterface::setEnabled( bool b ) +void OMonitoringInterface::setEnabled( bool ) { } /*====================================================================================== * OCiscoMonitoringInterface *======================================================================================*/ OCiscoMonitoringInterface::OCiscoMonitoringInterface( ONetworkInterface* iface, bool prismHeader ) :OMonitoringInterface( iface, prismHeader ) { iface->setMonitoring( this ); } OCiscoMonitoringInterface::~OCiscoMonitoringInterface() { } -void OCiscoMonitoringInterface::setEnabled( bool b ) +void OCiscoMonitoringInterface::setEnabled( bool /*b*/ ) { QString fname; fname.sprintf( "/proc/driver/aironet/%s", (const char*) _if->name() ); QFile f( fname ); if ( !f.exists() ) return; if ( f.open( IO_WriteOnly ) ) { QTextStream s( &f ); s << "Mode: r"; s << "Mode: y"; s << "XmitPower: 1"; diff --git a/libopie2/opienet/opcap.cpp b/libopie2/opienet/opcap.cpp index 03e4502..25ac09b 100644 --- a/libopie2/opienet/opcap.cpp +++ b/libopie2/opienet/opcap.cpp @@ -181,24 +181,25 @@ QString OPacket::dump( int bpl ) const } int OPacket::len() const { return _hdr.len; } QTextStream& operator<<( QTextStream& s, const OPacket& p ) { s << p.dumpStructure(); + return s; } /*====================================================================================== * OEthernetPacket *======================================================================================*/ OEthernetPacket::OEthernetPacket( const unsigned char* end, const struct ether_header* data, QObject* parent ) :QObject( parent, "Ethernet" ), _ether( data ) { odebug << "Source = " << sourceAddress().toString() << oendl; @@ -318,25 +319,25 @@ int OIPPacket::protocol() const int OIPPacket::checksum() const { return EXTRACT_16BITS( &_iphdr->check ); } /*====================================================================================== * OARPPacket *======================================================================================*/ -OARPPacket::OARPPacket( const unsigned char* end, const struct myarphdr* data, QObject* parent ) +OARPPacket::OARPPacket( const unsigned char* /*end*/, const struct myarphdr* data, QObject* parent ) :QObject( parent, "ARP" ), _arphdr( data ) { odebug << "OARPPacket::OARPPacket(): decoding ARP header..." << oendl; odebug << "ARP type seems to be " << EXTRACT_16BITS( &_arphdr->ar_op ) << " = " << type() << oendl; odebug << "Sender: MAC " << senderMacAddress().toString() << " = IP " << senderIPV4Address().toString() << oendl; odebug << "Target: MAC " << targetMacAddress().toString() << " = IP " << targetIPV4Address().toString() << oendl; } OARPPacket::~OARPPacket() { } @@ -538,25 +539,25 @@ QHostAddress ODHCPPacket::relayAddress() const OMacAddress ODHCPPacket::clientMacAddress() const { return OMacAddress( _dhcphdr->chaddr ); } /*====================================================================================== * OTCPPacket *======================================================================================*/ -OTCPPacket::OTCPPacket( const unsigned char* end, const struct tcphdr* data, QObject* parent ) +OTCPPacket::OTCPPacket( const unsigned char* /*end*/, const struct tcphdr* data, QObject* parent ) :QObject( parent, "TCP" ), _tcphdr( data ) { odebug << "OTCPPacket::OTCPPacket(): decoding TCP header..." << oendl; } OTCPPacket::~OTCPPacket() { } @@ -825,25 +826,25 @@ bool OWaveLanManagementPacket::canCFP_REQ() const bool OWaveLanManagementPacket::canPrivacy() const { return CAPABILITY_PRIVACY( EXTRACT_LE_16BITS( &_body->capability_info ) ); } /*====================================================================================== * OWaveLanManagementSSID *======================================================================================*/ -OWaveLanManagementSSID::OWaveLanManagementSSID( const unsigned char* end, const struct ssid_t* data, QObject* parent ) +OWaveLanManagementSSID::OWaveLanManagementSSID( const unsigned char* /*end*/, const struct ssid_t* data, QObject* parent ) :QObject( parent, "802.11 SSID" ), _data( data ) { odebug << "OWaveLanManagementSSID()" << oendl; } OWaveLanManagementSSID::~OWaveLanManagementSSID() { } QString OWaveLanManagementSSID::ID( bool decloak ) const @@ -861,121 +862,121 @@ QString OWaveLanManagementSSID::ID( bool decloak ) const { if ( essid[i] >= 32 && essid[i] <= 126 ) decloakedID.append( essid[i] ); else decloakedID.append( '.' ); } return decloakedID; } /*====================================================================================== * OWaveLanManagementRates *======================================================================================*/ -OWaveLanManagementRates::OWaveLanManagementRates( const unsigned char* end, const struct rates_t* data, QObject* parent ) +OWaveLanManagementRates::OWaveLanManagementRates( const unsigned char* /*end*/, const struct rates_t* data, QObject* parent ) :QObject( parent, "802.11 Rates" ), _data( data ) { odebug << "OWaveLanManagementRates()" << oendl; } OWaveLanManagementRates::~OWaveLanManagementRates() { } /*====================================================================================== * OWaveLanManagementCF *======================================================================================*/ -OWaveLanManagementCF::OWaveLanManagementCF( const unsigned char* end, const struct cf_t* data, QObject* parent ) +OWaveLanManagementCF::OWaveLanManagementCF( const unsigned char* /*end*/, const struct cf_t* data, QObject* parent ) :QObject( parent, "802.11 CF" ), _data( data ) { odebug << "OWaveLanManagementCF()" << oendl; } OWaveLanManagementCF::~OWaveLanManagementCF() { } /*====================================================================================== * OWaveLanManagementFH *======================================================================================*/ -OWaveLanManagementFH::OWaveLanManagementFH( const unsigned char* end, const struct fh_t* data, QObject* parent ) +OWaveLanManagementFH::OWaveLanManagementFH( const unsigned char* /*end*/, const struct fh_t* data, QObject* parent ) :QObject( parent, "802.11 FH" ), _data( data ) { odebug << "OWaveLanManagementFH()" << oendl; } OWaveLanManagementFH::~OWaveLanManagementFH() { } /*====================================================================================== * OWaveLanManagementDS *======================================================================================*/ -OWaveLanManagementDS::OWaveLanManagementDS( const unsigned char* end, const struct ds_t* data, QObject* parent ) +OWaveLanManagementDS::OWaveLanManagementDS( const unsigned char* /*end*/, const struct ds_t* data, QObject* parent ) :QObject( parent, "802.11 DS" ), _data( data ) { odebug << "OWaveLanManagementDS()" << oendl; } OWaveLanManagementDS::~OWaveLanManagementDS() { } int OWaveLanManagementDS::channel() const { return _data->channel; } /*====================================================================================== * OWaveLanManagementTim *======================================================================================*/ -OWaveLanManagementTim::OWaveLanManagementTim( const unsigned char* end, const struct tim_t* data, QObject* parent ) +OWaveLanManagementTim::OWaveLanManagementTim( const unsigned char* /*end*/, const struct tim_t* data, QObject* parent ) :QObject( parent, "802.11 Tim" ), _data( data ) { odebug << "OWaveLanManagementTim()" << oendl; } OWaveLanManagementTim::~OWaveLanManagementTim() { } /*====================================================================================== * OWaveLanManagementIBSS *======================================================================================*/ -OWaveLanManagementIBSS::OWaveLanManagementIBSS( const unsigned char* end, const struct ibss_t* data, QObject* parent ) +OWaveLanManagementIBSS::OWaveLanManagementIBSS( const unsigned char* /*end*/, const struct ibss_t* data, QObject* parent ) :QObject( parent, "802.11 IBSS" ), _data( data ) { odebug << "OWaveLanManagementIBSS()" << oendl; } OWaveLanManagementIBSS::~OWaveLanManagementIBSS() { } /*====================================================================================== * OWaveLanManagementChallenge *======================================================================================*/ -OWaveLanManagementChallenge::OWaveLanManagementChallenge( const unsigned char* end, const struct challenge_t* data, QObject* parent ) +OWaveLanManagementChallenge::OWaveLanManagementChallenge( const unsigned char* /*end*/, const struct challenge_t* data, QObject* parent ) :QObject( parent, "802.11 Challenge" ), _data( data ) { odebug << "OWaveLanManagementChallenge()" << oendl; } OWaveLanManagementChallenge::~OWaveLanManagementChallenge() { } /*====================================================================================== * OWaveLanDataPacket @@ -1023,25 +1024,25 @@ OLLCPacket::OLLCPacket( const unsigned char* end, const struct ieee_802_11_802_2 } OLLCPacket::~OLLCPacket() { } /*====================================================================================== * OWaveLanControlPacket *======================================================================================*/ -OWaveLanControlPacket::OWaveLanControlPacket( const unsigned char* end, const struct ieee_802_11_control_header* data, OWaveLanPacket* parent ) +OWaveLanControlPacket::OWaveLanControlPacket( const unsigned char* /*end*/, const struct ieee_802_11_control_header* data, OWaveLanPacket* parent ) :QObject( parent, "802.11 Control" ), _header( data ) { odebug << "OWaveLanControlPacket::OWaveLanDataControl(): decoding frame..." << oendl; odebug << "Detected subtype is " << controlType() << oendl; } OWaveLanControlPacket::~OWaveLanControlPacket() { } |