Re: [COMMITTERS] pgsql: Remove dead assignment
От | Peter Eisentraut |
---|---|
Тема | Re: [COMMITTERS] pgsql: Remove dead assignment |
Дата | |
Msg-id | 1332790159.3800.8.camel@vanquo.pezone.net обсуждение исходный текст |
Ответ на | Re: [COMMITTERS] pgsql: Remove dead assignment (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: [COMMITTERS] pgsql: Remove dead assignment
|
Список | 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.
В списке pgsql-hackers по дате отправления: