From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [COMMITTERS] pgsql: Remove dead assignment |
Date: | 2012-03-26 19:29:19 |
Message-ID: | 1332790159.3800.8.camel@vanquo.pezone.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
On mån, 2012-03-26 at 15:15 -0400, Tom Lane wrote:
> init_sequence(seq_relid, &elm, &seq_rel);
> - seq = read_info(elm, seq_rel, &buf);
> + read_info(elm, seq_rel, &buf);
>
>
> I have to object to this patch. In the blind service of eliminating
> warnings from some tool or other, you will introduce warnings from
> other tools? It's traditional for lint to complain about code that
> sometimes ignores the return value of a function, for instance.
Yes, but the return value is ignored in this case as well. Just
assigning it doesn't change that.
> I also do not think it does anything for readability for this call
> of read_info() to be unexpectedly unlike all the others.
I do not think that it is good code quality to assign something to a
variable and then assign something different to a variable later in the
same function. It is better, on the other hand, if a function call
looks different if what it's supposed to do is different.
But I don't want to get hung up on this. I thought it was just an
oversight.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2012-03-26 19:53:52 | Re: [COMMITTERS] pgsql: Remove dead assignment |
Previous Message | Tom Lane | 2012-03-26 19:15:42 | Re: [COMMITTERS] pgsql: Remove dead assignment |
From | Date | Subject | |
---|---|---|---|
Next Message | Thom Brown | 2012-03-26 19:36:40 | Re: Command Triggers, v16 |
Previous Message | Dimitri Fontaine | 2012-03-26 19:24:46 | Re: Command Triggers, v16 |