[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdebase/kicker/applets/naughty
From:       Frerich Raabe <raabe () kde ! org>
Date:       2005-02-16 12:28:51
Message-ID: 20050216122851.31CD51D1A9 () office ! kde ! org
[Download RAW message or body]

CVS commit by raabe: 

- Less warnings, especially for people using neither Linux nor OpenBSD


  M +10 -5     NaughtyProcessMonitor.cpp   1.8


--- kdebase/kicker/applets/naughty/NaughtyProcessMonitor.cpp  #1.7:1.8
@@ -220,5 +220,5 @@ NaughtyProcessMonitor::canKill(ulong pid
 
   return geteuid() == a;
-#elif __OpenBSD__
+#elif defined(__OpenBSD__)
   // simply check if entry exists in the uid map and use it
   if (!d->uidMap_.contains(pid))
@@ -227,4 +227,5 @@ NaughtyProcessMonitor::canKill(ulong pid
   return geteuid () == d->uidMap_[pid] ;
 #else
+  Q_UNUSED( pid );
   return false;
 #endif
@@ -257,5 +258,5 @@ NaughtyProcessMonitor::processName(ulong
   QString unicode(QString::fromLocal8Bit(s));
 
-#elif __OpenBSD__
+#elif defined(__OpenBSD__)
   int mib[4] ;
   size_t size ;
@@ -298,4 +299,5 @@ NaughtyProcessMonitor::processName(ulong
 
 #else
+  Q_UNUSED( pid );
   return QString::null;
 #endif
@@ -327,5 +329,5 @@ NaughtyProcessMonitor::cpuLoad() const
 
   return (forgetThisOne ? 0 : diff);
-#elif __OpenBSD__
+#elif defined(__OpenBSD__)
   int mib[2] ;
   long cp_time[CPUSTATES] ;
@@ -367,5 +369,5 @@ NaughtyProcessMonitor::pidList() const
 
   return pl;
-#elif __OpenBSD__
+#elif defined(__OpenBSD__)
   int mib[3] ;
   int nprocs = 0, nentries ;
@@ -446,5 +448,5 @@ NaughtyProcessMonitor::getLoad(ulong pid
 
   return true;
-#elif __OpenBSD__
+#elif defined(__OpenBSD__)
   // use cache
   if (!d->cacheLoadMap_.contains(pid))
@@ -454,4 +456,6 @@ NaughtyProcessMonitor::getLoad(ulong pid
   return true ;
 #else
+  Q_UNUSED( pid );
+  Q_UNUSED( load );
   return false;
 #endif
@@ -464,4 +468,5 @@ NaughtyProcessMonitor::kill(ulong pid) c
   return 0 == ::kill(pid, SIGKILL);
 #else
+  Q_UNUSED( pid );
   return false;
 #endif


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic