Browse Source

prevent compiler crash in O4 Irix build

David Rose 24 years ago
parent
commit
53026e8f35
2 changed files with 22 additions and 1 deletions
  1. 21 0
      panda/src/pstatclient/pStatCollector.I
  2. 1 1
      panda/src/pstatclient/pStatCollector.h

+ 21 - 0
panda/src/pstatclient/pStatCollector.I

@@ -345,4 +345,25 @@ get_level(const PStatThread &thread) {
   return _client->get_level(_index, thread._index);
 }
 
+#else  // DO_PSTATS
+
+////////////////////////////////////////////////////////////////////
+//     Function: PStatCollector::Constructor
+//       Access: Published
+//  Description: This bogus version of the function is only defined if
+//               DO_PSTATS is not defined, meaning all these functions
+//               should compile to nothing.
+////////////////////////////////////////////////////////////////////
+INLINE PStatCollector::
+PStatCollector(const PStatCollector &parent, const string &) {
+  // We need this bogus comparison just to prevent the SGI compiler
+  // from dumping core.  It's perfectly meaningless.
+#ifdef mips
+  if (&parent == (const PStatCollector *)NULL) {
+    return;
+  }
+#endif
+}
+
+
 #endif  // DO_PSTATS

+ 1 - 1
panda/src/pstatclient/pStatCollector.h

@@ -100,7 +100,7 @@ PUBLISHED:
   INLINE PStatCollector(const string &,
                         PStatClient * = NULL) { }
   INLINE PStatCollector(const PStatCollector &,
-                        const string &) { }
+                        const string &);
 
   INLINE bool is_active() { return false; }
   INLINE void start() { }