[PATCH] diff portability fixes
Matheus Izvekov
mizvekov at gmail.com
Wed Feb 10 15:24:08 UTC 2010
On 10:12 Wed 10 Feb , Stefan Seyfried wrote:
> On Tue, 9 Feb 2010 20:09:26 -0600
> Rob Landley <rob at landley.net> wrote:
>
> > I was with you up until the word "useful".
> >
> > That's a coding style issue. (We're not the only project to consider those a
> > pain and avoid them. The compiler's already moving them up to the start of
> > the block and doing lifetime analysis on them anyway, we might as well be
> > explicit about it.)
>
> A lot of Dan's "fixes" are actually fixing coding style as a side
> effect ;) For example, I consider
>
> for (int i = 0; i < j; i++)
>
> to be a "mixed declaration and code" issue. Dan fixed that. :)
> I also consider
Is it really? Does that also mean that
foo = bar();
if (foo) {
int a = 3;
...
}
is also mixed declaration and code? What really is the difference?
I don't buy into this. Was it really an improvement in
readability? Is it worth the risk of breaking it?
> - FILE_and_pos_t ft[2] = { { fp[0] }, { fp[1] } };
> + FILE_and_pos_t ft[2];
> + ft[0].ft_fp = fp[0];
> + ft[0].ft_pos = 0;
> + ft[1].ft_fp = fp[1];
> + ft[1].ft_pos = 0;
> +
>
> to be an improvement in readability, but maybe that's just me.
Oh, please. How do you evaluate that? You didn't understand the
code before, but you do now? Even bothering with something like that is a
complete waste of productivity.
> So he is doing cleanup of the code - and as a reward, he gets the
> occasional compatibility fix for his weird compiler in. I think that's a
> fair deal.
Not as simple as that. Even a small cleanup like that had a bug, and
a fairly obvious to spot one, had it been even tested once.
> Besides him, nobody will ever check patches for issues besides the
> current coding style guidelines, so yes, he has to keep an endless
> churn of patches coming, but that's up to him. The day he stops being
> interested in that compiler, probably nobody will care anymore, and the
> patches will stop.
> Personally, I found Dan's patches to not be very intrusive, he is doing
> useful work, and I think he deserves the reward.
I disagree. It makes some applets compile on C89, but they are not
marked as such in any way, and the user has to figure out what to
disable by reading compiler error messages, and he must be able to
deduce they are C99 incompatibilities, or else he would miss reporting
genuine compiler breakages or waste time reporting invalid bugs.
How many people out there need this anyway?
> Just my 2 cents, of course
> --
> Stefan Seyfried
>
> "Any ideas, John?"
> "Well, surrounding them's out."
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
More information about the busybox
mailing list