[haiku-commits] Re: haiku: hrev43356 - src/kits/tracker

  • From: Siarzhuk Zharski <zharik@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 29 Nov 2011 07:18:43 +0100

Hi Philippe,

Am 29.11.2011 01:03, schrieb Philippe Saint-Pierre:
On Mon, Nov 28, 2011 at 1:21 PM, marcus overhagen
<marcusoverhagen@xxxxxxxxx>  wrote:
On Mon, Nov 28, 2011 at 6:59 PM,<stpere@xxxxxxxxx>  wrote:

        status_t error = item->InitCheck();
        if (error != B_OK)
+               throw (status_t)error;
Is this typecast really needed?
Technically no.  Everything worked.  But it confused Coverity who saw
a bunch of Uncaught exceptions because of it. (it thought that it was
throwing a int exception, and didn't noticed that catching a status_t
exception would catch it..

So this is the Coverity's error but our? It is looking a bit funny when we fighting for code clearance and against every extra parentheses but have to bloat our code with such "strange" constructs to satisfy some 3rd party tools, that thinks that it has enough authority to point out. :-) Shouldn't it be fixed on the Coverity side or simply ignored? By the way, another example of such silly "errors" is a fallthrough case in switch that is absolutely legal programming construction.


---
Kind Regards,
  S.Zharski


Other related posts: