Re: [dev] [st] [PATCH] Replace close and dup with dup2.

From: Alex Pilon <alp_AT_alexpilon.ca>
Date: Mon, 27 Apr 2015 12:14:29 -0400

On Mon, Apr 27, 2015 at 10:55:48AM +0200, Roberto E. Vargas Caballero wrote:
> > Matter of style maybe. It's still annoying to have noise in the build.
>
> I don't admit this types of commits about quiting some compiler.

Ideally, that's fine, and I'd very much agree with you. However,
practically, quieting some compiler that most people use is not so
outlandish and idea.

Whatever. You're the maintainer. If you want to make however many people
who care edit config.mk to do the same thing, then it's your
prerogative.

> First point, warnings are not part of the standard,

I know… this is not about standards, it's about shutting up the compiler
that most people use—maybe because they have to compile insane code
often enough, or ‘fixing’ the code. It's not the user you should train
to ignore warnings.

> Second I don't have any warning with any of the compilers I use.

Good for you. How is that in any way relevant? There is no prescribed
compiler, is there? Also, the idea with this sort of distribution model
is that the users also catch things that the maintainer won't.

> And third, this way of redirecting streams is the form you can find in any
> book about Unix programming, so I don't see any problem in it.

Do you love programming with side effects? Fine. It's so trivial here.
We can agree to disagree. I wouldn't judge the worthiness of something
just because it appears in some books though, only on its own merits.

> Maybe you should send a patch to gcc to include dup in the "don't care
> return value" function group.

No, for reasons similar to the arguments above, even if it does create
‘false positives’.

Received on Mon Apr 27 2015 - 18:14:29 CEST

This archive was generated by hypermail 2.3.0 : Mon Apr 27 2015 - 18:36:05 CEST