Re: Unused parameters & co in code

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Unused parameters & co in code
Date: 2019-01-30 11:33:47
Message-ID: cb871b77-b260-f7eb-9168-7e6395832a86@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 30/01/2019 08:33, Michael Paquier wrote:
> I just got a run with CFLAGS with the following options:
> -Wunused-function -Wunused-variable -Wunused-const-variable

These are part of -Wall.

> -Wno-unused-result

What is the purpose of this?

> -Wunused-parameter

I think it's worth cleaning this up a bit, but it needs to be done by
hand, unless you want to add a large number of pg_attribute_unused()
decorations.

> -Wunused-macros

I have looked into that in the past. There are a few that were
genuinely left behind accidentally, but most are there for completeness
or symmetry and don't look like they should be removed. Also you get
junk from flex and perl and the like. Needs to be addressed case by
case. I can dig up my old branch and make some proposals.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Konstantin Knizhnik 2019-01-30 12:04:53 Replication & recovery_min_apply_delay
Previous Message Alvaro Herrera 2019-01-30 11:14:05 Re: Unused parameters & co in code