Re: Unused parameters & co in code - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Unused parameters & co in code
Date
Msg-id cb871b77-b260-f7eb-9168-7e6395832a86@2ndquadrant.com
Whole thread Raw
In response to Unused parameters & co in code  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Unused parameters & co in code  (Michael Paquier <michael@paquier.xyz>)
List 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


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Unused parameters & co in code
Next
From: Konstantin Knizhnik
Date:
Subject: Replication & recovery_min_apply_delay