[xsd-users] Warning 6005

Uri Karagila uri at hyperroll.com
Tue Feb 19 01:47:26 EST 2008


Well, I can make another offer: replace the code at the _type
constructor:
        _type (const type& x, flags f = 0, container* c = 0)
            : container_ (c)
        {
          while (&f == 0) /* unused */;

          if (x.dom_info_.get ())
          {
            std::auto_ptr<dom_info> r (x.dom_info_->clone (*this, c));
            dom_info_ = r;
          }
        }
With the following code (note the new comments, and the removed line):
        _type (const type& x, flags/* f*/ = 0, container* c = 0)
            : container_ (c)
        {
          if (x.dom_info_.get ())
          {
            std::auto_ptr<dom_info> r (x.dom_info_->clone (*this, c));
            dom_info_ = r;
          }
        }
And if my offer is accepted, I can do it in my current installation base
right now until next version or next issue :-)

-----Original Message-----
From: Boris Kolpackov [mailto:boris at codesynthesis.com] 
Sent: Monday, February 18, 2008 3:59 PM
To: Uri Karagila
Cc: xsd-users at codesynthesis.com
Subject: Re: [xsd-users] Warning 6005

Hi Uri,

Uri Karagila <uri at hyperroll.com> writes:

> The aCC (HP ANSI C++ B3910B A.03.80) is the most updated version of
the
> compiler for HP-UX 11.11.

Hm, I guess then it should be triggered by the compiler options.
Perhaps when optimization is turned on...


> Yes, the commenting out the cycle at line 299 removes the warning.

Great! I am going to get rid of this loop in the next release. For
the time being you can keep it commented out or you can disables
the warning with the +W6005 option.


> And I don't understand how this loop helps you in squashing warnings.

Some compilers issue a warning if a function argument is declared
but never used. Adding a no-op loop like this:

while (&arg == 0);

helps silence those compilers.

Boris




More information about the xsd-users mailing list