summaryrefslogtreecommitdiff
authorzecke <zecke>2004-09-10 11:16:54 (UTC)
committer zecke <zecke>2004-09-10 11:16:54 (UTC)
commit59dbb076579e0387f960525b415511946eb83b17 (patch) (side-by-side diff)
treedc8caeebf7e5a1968a399838b53cb09a1537d9ec
parentb8baf551919868737c6f56a05e6efa1bad4d97ac (diff)
downloadopie-59dbb076579e0387f960525b415511946eb83b17.zip
opie-59dbb076579e0387f960525b415511946eb83b17.tar.gz
opie-59dbb076579e0387f960525b415511946eb83b17.tar.bz2
Fix the issues the compilers bothers
remove unused parameters, give return values on return
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/interfaces/interfacesetupimp.cpp16
-rw-r--r--noncore/settings/networksettings/mainwindow/addconnectionimp.cpp8
-rw-r--r--noncore/settings/networksettings/ppp/connect.cpp13
-rw-r--r--noncore/settings/networksettings/ppp/devices.cpp6
-rw-r--r--noncore/settings/networksettings/ppp/edit.cpp2
-rw-r--r--noncore/settings/networksettings/ppp/interfaceinformationppp.cpp4
-rw-r--r--noncore/settings/networksettings/ppp/pppmodule.cpp23
-rw-r--r--noncore/settings/networksettings/ppp/pppmodule.h2
-rw-r--r--noncore/settings/networksettings/wlan/keyedit.cpp4
-rw-r--r--noncore/settings/networksettings/wlan/wlanimp2.cpp1
10 files changed, 40 insertions, 39 deletions
diff --git a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
index 8498759..62b1b7a 100644
--- a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
+++ b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
@@ -26,5 +26,5 @@
using namespace Opie::Ui;
using namespace Opie::Core;
-InterfaceSetupImp::InterfaceSetupImp(QWidget* parent, const char* name, Interface *i, Interfaces *j, WFlags fl) : InterfaceSetup(parent, name, fl), interface(i), interfaces(j), delInterfaces(false){
+InterfaceSetupImp::InterfaceSetupImp(QWidget* parent, const char* name, Interface *i, Interfaces *j, WFlags fl) : InterfaceSetup(parent, name, fl), interfaces(j), interface(i), delInterfaces(false){
if (j == 0) {
delInterfaces = true;
@@ -48,5 +48,5 @@ bool InterfaceSetupImp::saveChanges(){
bool error;
QString iface = interfaces->getInterfaceName(error);
- odebug << "InterfaceSetupImp::saveChanges saves interface " << iface.latin1() << "" << oendl;
+ odebug << "InterfaceSetupImp::saveChanges saves interface " << iface.latin1() << "" << oendl;
if(!saveSettings())
return false;
@@ -74,5 +74,5 @@ bool InterfaceSetupImp::saveChanges(){
if (!restart.start(OProcess::Block, OProcess::NoCommunication) ) {
- owarn << "unstable to spawn ifdown/ifup" << oendl;
+ owarn << "unstable to spawn ifdown/ifup" << oendl;
}
@@ -159,5 +159,5 @@ void InterfaceSetupImp::setProfile(const QString &profile){
interfaces->addMapping(interface->getInterfaceName());
if(!interfaces->setMapping(interface->getInterfaceName())){
- odebug << "InterfaceSetupImp: Added Mapping, but still can't setInterface." << oendl;
+ odebug << "InterfaceSetupImp: Added Mapping, but still can't setInterface." << oendl;
return;
}
@@ -169,5 +169,5 @@ void InterfaceSetupImp::setProfile(const QString &profile){
interfaces->addInterface(newInterfaceName, INTERFACES_FAMILY_INET, INTERFACES_METHOD_DHCP);
if(!interfaces->setInterface(newInterfaceName)){
- odebug << "InterfaceSetupImp: Added interface, but still can't setInterface." << oendl;
+ odebug << "InterfaceSetupImp: Added interface, but still can't setInterface." << oendl;
return;
}
@@ -187,5 +187,5 @@ void InterfaceSetupImp::setProfile(const QString &profile){
autoStart->setChecked(interfaces->isAuto(interface->getInterfaceName()));
QString dns = interfaces->getInterfaceOption("up "DNSSCRIPT" -a", error);
- odebug << "dns >" << dns.latin1() << "<" << oendl;
+ odebug << "dns >" << dns.latin1() << "<" << oendl;
if(dns.contains(" ")){
firstDNSLineEdit->setText(dns.mid(0, dns.find(" ")));
@@ -201,6 +201,6 @@ void InterfaceSetupImp::setProfile(const QString &profile){
- owarn << "InterfaceSetupImp::setProfile(" << profile.latin1() << ")\n" << oendl;
- owarn << "InterfaceSetupImp::setProfile: iface is " << interfaces->getInterfaceName(error).latin1() << "\n" << oendl;
+ owarn << "InterfaceSetupImp::setProfile(" << profile.latin1() << ")\n" << oendl;
+ owarn << "InterfaceSetupImp::setProfile: iface is " << interfaces->getInterfaceName(error).latin1() << "\n" << oendl;
}
diff --git a/noncore/settings/networksettings/mainwindow/addconnectionimp.cpp b/noncore/settings/networksettings/mainwindow/addconnectionimp.cpp
index f18d8d1..84f1cf6 100644
--- a/noncore/settings/networksettings/mainwindow/addconnectionimp.cpp
+++ b/noncore/settings/networksettings/mainwindow/addconnectionimp.cpp
@@ -11,5 +11,5 @@
/**
* Constructor
- */
+ */
AddConnectionImp::AddConnectionImp(QWidget *parent, const char *name, WFlags f):AddConnection(parent, name, f){
connect(registeredServicesList, SIGNAL(selectionChanged()), this, SLOT(changed()));
@@ -19,5 +19,5 @@ AddConnectionImp::AddConnectionImp(QWidget *parent, const char *name, WFlags f):
/**
* The current item changed, update the discription.
- */
+ */
void AddConnectionImp::changed(){
QListViewItem *item = registeredServicesList->currentItem();
@@ -29,10 +29,10 @@ void AddConnectionImp::changed(){
* Save a copy of newList for the discriptions and append them all to the view
* @param newList the new list of possible interfaces
- */
+ */
void AddConnectionImp::addConnections(const QMap<QString, QString> &newList){
list = newList;
QMap<QString, QString>::Iterator it;
for( it = list.begin(); it != list.end(); ++it )
- QListViewItem *item = new QListViewItem(registeredServicesList, it.key());
+ (void)new QListViewItem(registeredServicesList, it.key());
registeredServicesList->setCurrentItem(registeredServicesList->firstChild());
}
diff --git a/noncore/settings/networksettings/ppp/connect.cpp b/noncore/settings/networksettings/ppp/connect.cpp
index 24d33f4..128877a 100644
--- a/noncore/settings/networksettings/ppp/connect.cpp
+++ b/noncore/settings/networksettings/ppp/connect.cpp
@@ -214,5 +214,6 @@ void ConnectWidget::init() {
qApp->processEvents();
QApplication::flushX();
- pid_t id = execute_command(_ifaceppp->data()->command_before_connect());
+ (void)execute_command(_ifaceppp->data()->command_before_connect());
+
// int i, status;
@@ -474,5 +475,5 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
scriptArgument = *(arglist->at(scriptindex));
} else {
- odebug << "End of script" << oendl;
+ odebug << "End of script" << oendl;
vmain = 10;
return;
@@ -840,5 +841,5 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
if_timeout_timer->start(_ifaceppp->data()->pppdTimeout()*1000);
- odebug << "started if timeout timer with " << _ifaceppp->data()->pppdTimeout()*1000 << "" << oendl;
+ odebug << "started if timeout timer with " << _ifaceppp->data()->pppdTimeout()*1000 << "" << oendl;
// find out PPP interface and notify the stats module
@@ -850,5 +851,5 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
emit debugMessage(QObject::tr("Starting pppd..."));
- odebug << "execppp() returned with return-code " << result << "" << oendl;
+ odebug << "execppp() returned with return-code " << result << "" << oendl;
if(result) {
@@ -1066,5 +1067,5 @@ void ConnectWidget::if_waiting_timed_out() {
if_timer->stop();
if_timeout_timer->stop();
- odebug << "if_waiting_timed_out()" << oendl;
+ odebug << "if_waiting_timed_out()" << oendl;
_ifaceppp->data()->setpppdError(E_IF_TIMEOUT);
@@ -1273,5 +1274,5 @@ bool ConnectWidget::execppp() {
}
- owarn << "Command IS: " << command.latin1() << "" << oendl;
+ owarn << "Command IS: " << command.latin1() << "" << oendl;
qApp->flushX();
diff --git a/noncore/settings/networksettings/ppp/devices.cpp b/noncore/settings/networksettings/ppp/devices.cpp
index 42de44c..e2c67d8 100644
--- a/noncore/settings/networksettings/ppp/devices.cpp
+++ b/noncore/settings/networksettings/ppp/devices.cpp
@@ -75,9 +75,9 @@ DevicesWidget::DevicesWidget( InterfacePPP* ip, QWidget *parent, const char *nam
QStringList tmp = _pppdata->getDevicesNamesList();
- odebug << "DevicesWidget::DevicesWidget got devices " << tmp.join("--").latin1() << "" << oendl;
+ odebug << "DevicesWidget::DevicesWidget got devices " << tmp.join("--").latin1() << "" << oendl;
listListbox->insertStringList(tmp);
for (uint i = 0; i < listListbox->count(); i++){
- odebug << "listListbox->text(i) " << listListbox->text(i).latin1() << " == _pppdata->devname() " << _pppdata->devname().latin1() << "" << oendl;
+ odebug << "listListbox->text(i) " << listListbox->text(i).latin1() << " == _pppdata->devname() " << _pppdata->devname().latin1() << "" << oendl;
if ( listListbox->text(i) == _pppdata->devname() )
listListbox->setCurrentItem( i );
@@ -88,5 +88,5 @@ DevicesWidget::DevicesWidget( InterfacePPP* ip, QWidget *parent, const char *nam
void DevicesWidget::slotListBoxSelect(int idx) {
- bool ok = _pppdata->setDevice( listListbox->text(idx) );
+ _pppdata->setDevice( listListbox->text(idx) );
delete_b->setEnabled((bool)(idx != -1));
edit_b->setEnabled((bool)(idx != -1));
diff --git a/noncore/settings/networksettings/ppp/edit.cpp b/noncore/settings/networksettings/ppp/edit.cpp
index 3b2393c..6c9735c 100644
--- a/noncore/settings/networksettings/ppp/edit.cpp
+++ b/noncore/settings/networksettings/ppp/edit.cpp
@@ -1203,5 +1203,5 @@ QString PhoneNumberDialog::phoneNumber()
-void PhoneNumberDialog::textChanged(const QString &s)
+void PhoneNumberDialog::textChanged(const QString &)
{
// enableButtonOK(s.length() > 0);
diff --git a/noncore/settings/networksettings/ppp/interfaceinformationppp.cpp b/noncore/settings/networksettings/ppp/interfaceinformationppp.cpp
index 4755aed..56e1c1f 100644
--- a/noncore/settings/networksettings/ppp/interfaceinformationppp.cpp
+++ b/noncore/settings/networksettings/ppp/interfaceinformationppp.cpp
@@ -22,8 +22,8 @@ using namespace Opie::Core;
* just display's information about the interface that is passed to it.
*/
-InterfaceInformationPPP::InterfaceInformationPPP(QWidget *parent, const char *name, Interface *i, WFlags f)
+InterfaceInformationPPP::InterfaceInformationPPP(QWidget *parent, const char *name, Interface *i, WFlags )
:InterfaceInformationImp(parent, name, i, Qt::WStyle_ContextHelp)
{
- odebug << "InterfaceInformationPPP::InterfaceInformationPPP " << name << "" << oendl;
+ odebug << "InterfaceInformationPPP::InterfaceInformationPPP " << name << "" << oendl;
con = new ConnectWidget( (InterfacePPP*)i, this, "con" );
con->setSizePolicy( QSizePolicy(QSizePolicy::MinimumExpanding,
diff --git a/noncore/settings/networksettings/ppp/pppmodule.cpp b/noncore/settings/networksettings/ppp/pppmodule.cpp
index fb279ee..dec0177 100644
--- a/noncore/settings/networksettings/ppp/pppmodule.cpp
+++ b/noncore/settings/networksettings/ppp/pppmodule.cpp
@@ -64,8 +64,8 @@ PPPModule::PPPModule() : Module()
QMap<QString,QString>::Iterator it;
InterfacePPP *iface;
- odebug << "getting interfaces" << oendl;
+ odebug << "getting interfaces" << oendl;
for( it = ifaces.begin(); it != ifaces.end(); ++it )
{
- odebug << "ifaces " << it.key().latin1() << " " << it.data().latin1() << "" << oendl;
+ odebug << "ifaces " << it.key().latin1() << " " << it.data().latin1() << "" << oendl;
iface = new InterfacePPP( 0, it.key() );
iface->setHardwareName( it.data() );
@@ -75,5 +75,5 @@ PPPModule::PPPModule() : Module()
if ( running.contains( it.data() ) )
{
- odebug << "iface is running " << it.key().latin1() << "" << oendl;
+ odebug << "iface is running " << it.key().latin1() << "" << oendl;
handledInterfaceNames << running[it.data()].device;
iface->setStatus( true );
@@ -92,5 +92,5 @@ PPPModule::PPPModule() : Module()
PPPModule::~PPPModule()
{
- odebug << "PPPModule::~PPPModule() " << oendl;
+ odebug << "PPPModule::~PPPModule() " << oendl;
QMap<QString,QString> ifaces;
InterfaceKeeper keeper;
@@ -101,5 +101,5 @@ PPPModule::~PPPModule()
if ( i->getStatus() )
{
- odebug << "Iface " << i->getHardwareName().latin1() << " is still up" << oendl;
+ odebug << "Iface " << i->getHardwareName().latin1() << " is still up" << oendl;
InterfacePPP* ppp = static_cast<InterfacePPP*>(i);
keeper.addInterface( ppp->pppPID(), ppp->pppDev(), ppp->getHardwareName() );
@@ -145,5 +145,5 @@ bool PPPModule::isOwner(Interface *i)
QWidget *PPPModule::configure(Interface *i)
{
- odebug << "return ModemWidget" << oendl;
+ odebug << "return ModemWidget" << oendl;
PPPConfigWidget *pppconfig = new PPPConfigWidget( (InterfacePPP*)i,
0, "PPPConfig", false,
@@ -172,5 +172,5 @@ QList<Interface> PPPModule::getInterfaces()
{
// List all of the files in the peer directory
- odebug << "PPPModule::getInterfaces" << oendl;
+ odebug << "PPPModule::getInterfaces" << oendl;
return list;
}
@@ -178,5 +178,5 @@ QList<Interface> PPPModule::getInterfaces()
/**
* Attempt to add a new interface as defined by name
- * @param name the name of the type of interface that should be created given
+ * @param newInterface the name of the type of interface that should be created given
* by possibleNewInterfaces();
* @return Interface* NULL if it was unable to be created.
@@ -184,4 +184,5 @@ QList<Interface> PPPModule::getInterfaces()
Interface *PPPModule::addNewInterface(const QString &newInterface)
{
+ Q_CONST_UNUSED( newInterface )
InterfacePPP *ifaceppp;
@@ -265,5 +266,5 @@ namespace
con.pid = cfg.readNumEntry("pid");
con.device = cfg.readEntry("device");
- odebug << " " << con.name.latin1() << " " << con.device.latin1() << " " << con.pid << "" << oendl;
+ odebug << " " << con.name.latin1() << " " << con.device.latin1() << " " << con.pid << "" << oendl;
if ( con.pid != -1 && isAvailable( con.pid ) )
@@ -276,9 +277,9 @@ namespace
if (::kill(p, 0 ) == 0 || errno != ESRCH )
{
- odebug << "isAvailable " << p << "" << oendl;
+ odebug << "isAvailable " << p << "" << oendl;
return true;
}
- odebug << "notAvailable " << p << "" << oendl;
+ odebug << "notAvailable " << p << "" << oendl;
return false;
}
diff --git a/noncore/settings/networksettings/ppp/pppmodule.h b/noncore/settings/networksettings/ppp/pppmodule.h
index de649e4..1ecbf7a 100644
--- a/noncore/settings/networksettings/ppp/pppmodule.h
+++ b/noncore/settings/networksettings/ppp/pppmodule.h
@@ -23,5 +23,5 @@ public:
virtual bool remove(Interface* i);
virtual QString getPixmapName(Interface* i);
- virtual void receive(const QCString &msg, const QByteArray &arg) {};
+ virtual void receive(const QCString &, const QByteArray &) {};
private:
diff --git a/noncore/settings/networksettings/wlan/keyedit.cpp b/noncore/settings/networksettings/wlan/keyedit.cpp
index 13a1c3b..62f8960 100644
--- a/noncore/settings/networksettings/wlan/keyedit.cpp
+++ b/noncore/settings/networksettings/wlan/keyedit.cpp
@@ -12,10 +12,10 @@ KeyEdit::~KeyEdit()
}
-void KeyEdit::focusInEvent(QFocusEvent *event)
+void KeyEdit::focusInEvent(QFocusEvent *)
{
setEchoMode(Normal);
}
-void KeyEdit::focusOutEvent(QFocusEvent *event)
+void KeyEdit::focusOutEvent(QFocusEvent *)
{
setEchoMode(Password);
diff --git a/noncore/settings/networksettings/wlan/wlanimp2.cpp b/noncore/settings/networksettings/wlan/wlanimp2.cpp
index d36a702..5cb78cf 100644
--- a/noncore/settings/networksettings/wlan/wlanimp2.cpp
+++ b/noncore/settings/networksettings/wlan/wlanimp2.cpp
@@ -117,5 +117,4 @@ void WLANImp::parseOpts() {
void WLANImp::parseKeyStr(QString keystr) {
- int loc = 0;
int index = 1;
QString key;