Go Back   ZeroC Forums > Patches

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 07-12-2005
wrobbie wrobbie is offline
Registered User
 
Name: Rob Kramer
Organization: Solution Space Pte Ltd
Project: Information display systems
 
Join Date: Apr 2005
Location: Singapore
Posts: 10
Gcc 4.0.1 mini patch.

Hi,

Compiling with gcc 4.0.1 seems to work fine, but it complains about missing virtual destructors now and then:

../../include/IceUtil/AbstractMutex.h:20: warning: ‘class IceUtil::AbstractMutex’ has virtual functions but non-virtual destructor

etc..

Thinking about whether or not this is Bad with all the multiple inheritance going on makes my head explode, so below is a naive patchlet that adds a virtual destructor.

Code:
diff -Nur Ice-2.1.2.orig/include/IceUtil/AbstractMutex.h Ice-2.1.2.gcc-4.0.1/include/IceUtil/AbstractMutex.h
--- Ice-2.1.2.orig/include/IceUtil/AbstractMutex.h      2005-02-17 04:22:17.000000000 +0800
+++ Ice-2.1.2.gcc-4.0.1/include/IceUtil/AbstractMutex.h 2005-07-12 17:13:27.000000000 +0800
@@ -26,6 +26,9 @@
     virtual void lock() const = 0;
     virtual void unlock() const = 0;
     virtual bool tryLock() const = 0;
+
+    virtual ~AbstractMutex()
+    {}
 };

 template <typename T>
Don't think it would do any harm, but might as well be entirely useless

Cheers,

Rob
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Patch for Ice-3.1.0: icegridadmin application patch bug fix mpugach Patches 1 08-01-2006 06:26 AM


All times are GMT -4. The time now is 10:56 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.