Re: Why does load_external_function() return PGFunction?

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Why does load_external_function() return PGFunction?
Date: 2018-03-26 15:14:03
Message-ID: CA+TgmoYmmaXaoWhHGYydfS9rqS2m=JYZb0484drTr_+7TUzgKA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Mar 24, 2018 at 4:33 PM, Andres Freund <andres(at)anarazel(dot)de> wrote:
> I don't think it really changes the need, but it's worthwhile to note
> that gcc-8 warns about this now:
> /home/andres/src/postgresql/src/backend/postmaster/bgworker.c: In function ‘LookupBackgroundWorkerFunction’:
> /home/andres/src/postgresql/src/backend/postmaster/bgworker.c:1246:9: warning: cast between incompatible function types from ‘PGFunction’ {aka ‘long unsigned int (*)(struct FunctionCallInfoData *)’} to ‘void (*)(Datum)’ {aka ‘void (*)(long unsigned int)’} [-Wcast-function-type]
> return (bgworker_main_type)

That's probably going to mean we need, or at least want, to do
something about this at some point. Warning-free compiles are
desirable.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-03-26 15:27:48 Re: [PROPOSAL] Shared Ispell dictionaries
Previous Message Tom Lane 2018-03-26 15:13:42 Re: Direct converting numeric types to bool