Re: Booleans, what a wonderful type!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2007-07-18 at 03:19 +0100, Al Viro wrote:
> On Wed, Jul 18, 2007 at 03:43:39AM +0200, ricknu-0@xxxxxxxxxxxxxx wrote:
> 
> > * Most likly a _really_ stupid newbie question, but I have seen several of this
> > form:
> > <function>
> > {
> >         <variable> a;
> >         <doing something useful (no sign of 'a')>
> >         a = <some value/variable>;
> >         <exit>
> > }
> > How is this variable useful?
> 
> Explain, please.  If you mean moving the declaration down - it's not
> idiomatic in C and frankly, C++ style tends to make declarations harder
> to find when you read the code.

Judging by that pseudocode, I would guess that he means the function
never uses the value of a after assigning to it.  That would generally
represent a bug.

- Josh Triplett


-
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux