summaryrefslogtreecommitdiff
authorsimon <simon>2002-11-02 13:42:02 (UTC)
committer simon <simon>2002-11-02 13:42:02 (UTC)
commitf655415f77b200f9edfbe5732cd5f8da2b4dec47 (patch) (unidiff)
treec5c700cda16dff17876aabae3e676358907b8868
parentc795a77698b9fc785fb5f04fab8fed33f0570c3f (diff)
downloadopie-f655415f77b200f9edfbe5732cd5f8da2b4dec47.zip
opie-f655415f77b200f9edfbe5732cd5f8da2b4dec47.tar.gz
opie-f655415f77b200f9edfbe5732cd5f8da2b4dec47.tar.bz2
- fixed warning about missing return statement in non-void function.
Okayed by Michael Lauer
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/applets/wirelessapplet/networkinfo.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/noncore/applets/wirelessapplet/networkinfo.cpp b/noncore/applets/wirelessapplet/networkinfo.cpp
index 2274d99..e0c487b 100644
--- a/noncore/applets/wirelessapplet/networkinfo.cpp
+++ b/noncore/applets/wirelessapplet/networkinfo.cpp
@@ -177,58 +177,56 @@ bool MWirelessNetworkInterface::updateStatistics()
177 char c; 177 char c;
178 QString status; 178 QString status;
179 QString name; 179 QString name;
180 QFile wfile( PROCNETWIRELESS ); 180 QFile wfile( PROCNETWIRELESS );
181 bool hasFile = wfile.open( IO_ReadOnly ); 181 bool hasFile = wfile.open( IO_ReadOnly );
182 QTextStream wstream( &wfile ); 182 QTextStream wstream( &wfile );
183 if ( hasFile ) 183 if ( hasFile )
184 { 184 {
185 wstream.readLine(); // skip the first two lines 185 wstream.readLine(); // skip the first two lines
186 wstream.readLine(); // because they only contain headers 186 wstream.readLine(); // because they only contain headers
187 } 187 }
188 if ( ( !hasFile ) || ( wstream.atEnd() ) ) 188 if ( ( !hasFile ) || ( wstream.atEnd() ) )
189 { 189 {
190#ifdef MDEBUG 190#ifdef MDEBUG
191 qDebug( "WIFIAPPLET: D'oh! Someone removed the card..." ); 191 qDebug( "WIFIAPPLET: D'oh! Someone removed the card..." );
192#endif 192#endif
193 quality = -1; 193 quality = -1;
194 signal = IW_LOWER; 194 signal = IW_LOWER;
195 noise = IW_LOWER; 195 noise = IW_LOWER;
196 return false; 196 return false;
197 } 197 }
198 198
199 wstream >> name >> status >> quality >> c >> signal >> c >> noise; 199 wstream >> name >> status >> quality >> c >> signal >> c >> noise;
200 200
201 if ( quality > 92 )
202#ifdef MDEBUG 201#ifdef MDEBUG
202 if ( quality > 92 )
203 qDebug( "WIFIAPPLET: D'oh! Quality %d > estimated max!\n", quality ); 203 qDebug( "WIFIAPPLET: D'oh! Quality %d > estimated max!\n", quality );
204#endif 204
205 if ( ( signal > IW_UPPER ) || ( signal < IW_LOWER ) ) 205 if ( ( signal > IW_UPPER ) || ( signal < IW_LOWER ) )
206#ifdef MDEBUG
207 qDebug( "WIFIAPPLET: Doh! Strength %d > estimated max!\n", signal ); 206 qDebug( "WIFIAPPLET: Doh! Strength %d > estimated max!\n", signal );
208#endif 207
209 if ( ( noise > IW_UPPER ) || ( noise < IW_LOWER ) ) 208 if ( ( noise > IW_UPPER ) || ( noise < IW_LOWER ) )
210#ifdef MDEBUG
211 qDebug( "WIFIAPPLET: Doh! Noise %d > estimated max!\n", noise ); 209 qDebug( "WIFIAPPLET: Doh! Noise %d > estimated max!\n", noise );
212#endif 210#endif
213 211
214 return true; 212 return true;
215 213
216} 214}
217 215
218//--------------------------------------------------------------------------- 216//---------------------------------------------------------------------------
219// class Network 217// class Network
220// 218//
221 219
222MNetwork::MNetwork() 220MNetwork::MNetwork()
223{ 221{
224 procfile = PROCNETDEV; 222 procfile = PROCNETDEV;
225} 223}
226 224
227MNetwork::~MNetwork() 225MNetwork::~MNetwork()
228{ 226{
229} 227}
230 228
231//--------------------------------------------------------------------------- 229//---------------------------------------------------------------------------
232// class WirelessNetwork 230// class WirelessNetwork
233// 231//
234 232