Re: [PATCH] remove some usesless casts

2005-04-21 Thread Jörn Engel
On Thu, 21 April 2005 09:36:18 +0300, Pekka Enberg wrote: > > I think Jörn means that if you need an opaque data type, use void > pointers (which are automatically cast to the proper type) and that > all other casts are a design smell (except for the one or two special > cases where you actually

Re: [PATCH] remove some usesless casts

2005-04-21 Thread Pekka Enberg
Phillip, Jörn Engel wrote: > > Your definition of _unnecessary_ casts may differ from mine. > > Basically, every cast is unnecessary, except for maybe one or two - if > > that many. On 4/20/05, Phillip Lougher <[EMAIL PROTECTED]> wrote: > Well we agree to differ then. In my experience casts are

Re: [PATCH] remove some usesless casts

2005-04-21 Thread Pekka Enberg
Phillip, Jörn Engel wrote: Your definition of _unnecessary_ casts may differ from mine. Basically, every cast is unnecessary, except for maybe one or two - if that many. On 4/20/05, Phillip Lougher [EMAIL PROTECTED] wrote: Well we agree to differ then. In my experience casts are

Re: [PATCH] remove some usesless casts

2005-04-21 Thread Jörn Engel
On Thu, 21 April 2005 09:36:18 +0300, Pekka Enberg wrote: I think Jörn means that if you need an opaque data type, use void pointers (which are automatically cast to the proper type) and that all other casts are a design smell (except for the one or two special cases where you actually need

Re: [PATCH] remove some usesless casts

2005-04-20 Thread Jörn Engel
On Wed, 20 April 2005 21:51:15 +0100, Phillip Lougher wrote: > Jörn Engel wrote: > > >Your definition of _unnecessary_ casts may differ from mine. > >Basically, every cast is unnecessary, except for maybe one or two - if > >that many. > > Well we agree to differ then. In my experience casts are

Re: [PATCH] remove some usesless casts

2005-04-20 Thread Phillip Lougher
Jörn Engel wrote: Your definition of _unnecessary_ casts may differ from mine. Basically, every cast is unnecessary, except for maybe one or two - if that many. Well we agree to differ then. In my experience casts are sometimes necessary, and are often less clumsy than the alternatives (such as

Re: [PATCH] remove some usesless casts

2005-04-20 Thread Jörn Engel
On Wed, 20 April 2005 16:20:10 +0100, Phillip Lougher wrote: > Jörn Engel wrote: > >Squashfs is extremely cast-happy. This patch makes it less so. > > Thanks for the patch. Unnecessary casts were one of the things > mentioned when I submitted the patches to the LKML, and therefore I > suspect

Re: [PATCH] remove some usesless casts

2005-04-20 Thread Phillip Lougher
Jörn Engel wrote: Squashfs is extremely cast-happy. This patch makes it less so. Jörn Hi, Thanks for the patch. Unnecessary casts were one of the things mentioned when I submitted the patches to the LKML, and therefore I suspect most of them have been already fixed (but I will apply your

[PATCH] remove some usesless casts

2005-04-20 Thread Jörn Engel
Squashfs is extremely cast-happy. This patch makes it less so. Jörn -- If you're willing to restrict the flexibility of your approach, you can almost always do something better. -- John Carmack Signed-off-by: Jörn Engel <[EMAIL PROTECTED]> --- fs/squashfs/inode.c | 63

[PATCH] remove some usesless casts

2005-04-20 Thread Jörn Engel
Squashfs is extremely cast-happy. This patch makes it less so. Jörn -- If you're willing to restrict the flexibility of your approach, you can almost always do something better. -- John Carmack Signed-off-by: Jörn Engel [EMAIL PROTECTED] --- fs/squashfs/inode.c | 63

Re: [PATCH] remove some usesless casts

2005-04-20 Thread Phillip Lougher
Jörn Engel wrote: Squashfs is extremely cast-happy. This patch makes it less so. Jörn Hi, Thanks for the patch. Unnecessary casts were one of the things mentioned when I submitted the patches to the LKML, and therefore I suspect most of them have been already fixed (but I will apply your

Re: [PATCH] remove some usesless casts

2005-04-20 Thread Jörn Engel
On Wed, 20 April 2005 16:20:10 +0100, Phillip Lougher wrote: Jörn Engel wrote: Squashfs is extremely cast-happy. This patch makes it less so. Thanks for the patch. Unnecessary casts were one of the things mentioned when I submitted the patches to the LKML, and therefore I suspect most

Re: [PATCH] remove some usesless casts

2005-04-20 Thread Phillip Lougher
Jörn Engel wrote: Your definition of _unnecessary_ casts may differ from mine. Basically, every cast is unnecessary, except for maybe one or two - if that many. Well we agree to differ then. In my experience casts are sometimes necessary, and are often less clumsy than the alternatives (such as

Re: [PATCH] remove some usesless casts

2005-04-20 Thread Jörn Engel
On Wed, 20 April 2005 21:51:15 +0100, Phillip Lougher wrote: Jörn Engel wrote: Your definition of _unnecessary_ casts may differ from mine. Basically, every cast is unnecessary, except for maybe one or two - if that many. Well we agree to differ then. In my experience casts are sometimes