Stephan Bergmann wrote:
[...]
3 OSL_VERIFY

On unxsoli4 and unxsols4 PRODUCT builds, OSL_VERIFY(a == b) causes a spurious warning "The result of a comparison is unused" (because the argument of OSL_VERIFY is always executed, even for OSL_DEBUG_LEVEL == 0). Instead of disabling the corresponding unxsoli4 and unxsols4 warning, I would vote to change code

  OSL_VERIFY(e);

to

  if (!e) {
    OSL_ASSERT(false);
  }

(and thus work around the warning) on the ground that OSL_VERIFY is dangerous and confusing---unlike the other OSL diagnose functions, it *does* evaluate its argument for OSL_DEBUG_LEVEL == 0. In the interest of the "least surprise" principle, we IMO should deprecate OSL_VERIFY and replace all its occurrences as described above.

On CWS warnings01, I just changed OSL_VERIFY so that using it no longer triggers spurious warnings (I had twisted my mind too much to see that it is really easy to do that...). So, you can keep using OSL_VERIFY on CWS warnings01 if you like.

-Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to