[omniORB] Visual Studio 2008 level 4 compiler warnings

William Bauder bill at simplified.biz
Fri May 4 09:52:40 BST 2012


Any reason for the do..while?  The braces alone should suffice.

-----Original Message-----
From: omniorb-list-bounces at omniorb-support.com [mailto:omniorb-list-bounces at omniorb-support.com] On Behalf Of Duncan Grisby
Sent: Friday, May 04, 2012 5:44 AM
To: Richard Pitts
Cc: omniorb-list at omniorb-support.com
Subject: RE: [omniORB] Visual Studio 2008 level 4 compiler warnings

On Fri, 2012-05-04 at 10:08 +0100, Richard Pitts wrote:

> I’ve created a patch for cdrStream.h on trunk to resolve the C4127 
> warnings. The patch removes the CdrMarshal and CdrUnMarshal macros and 
> place the definitions in macro intMarshalFns.

Thanks for the patch. It makes sense for trunk, and I'll put something along those lines in. Perhaps you can send it again as an attachment, because it has become a bit mangled in the email body?

> Any suggestions welcome and feel free to make any changes. I’m hoping 
> this can be in the 4.1.7 release.

I'm afraid it can't be in the 4.1.7 release. The cdrStream layout is quite different in trunk (which will be the 4.2.x release) to what's in 4.1.x. The 4.2.x version can't be back-ported to 4.1.x because it's binary incompatible. 4.1.x uses the CdrMarshal and CdrUnmarshal macros rather more.

Anyway, I think the compiler warning is incredibly unwise. A do .. while
(0) loop is the standard way of defining a macro that's safe to use like a function. Surely the warning triggers on any robust macro code?

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --



_______________________________________________
omniORB-list mailing list
omniORB-list at omniorb-support.com
http://www.omniorb-support.com/mailman/listinfo/omniorb-list




More information about the omniORB-list mailing list