Re: plperl_helpers.h fix for clang

From: Alex Hunsaker <badalex(at)gmail(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Andrew Dunstan <andrew(at)dunslane(dot)net>
Subject: Re: plperl_helpers.h fix for clang
Date: 2012-05-24 17:31:03
Message-ID: CAFaPBrSu9aPaa9+iX4v4xDOYXsmLJdYVG4n8CdZb6aZPf=txzA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, May 24, 2012 at 11:19 AM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> clang warns about that newish SvREFCNT_inc(sv) call in plperl_helpers.h
> about an unused return value, because the macro expansion of
> SvREFCNT_inc(sv) returns sv.  The merit of that warning might be
> debatable, but it seems easy to fix by using SvREFCNT_inc_void(sv)
> instead.
>
> And we could use SvREFCNT_inc_simple_void(sv), since sv doesn't have any
> side effects, but that's optional.
>
> Any concerns?

Hrm I can't seem to find either of those functions in my copy of perl
5.8.1 or 5.16.0. I also looked for "_inc_" in the event I got casing
wrong :-(.

Perhaps I misunderstood, are you proposing to introduce those
functions? Im fine with that. Or doing (void)SvREFCNT_inc().

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Florian Pflug 2012-05-24 17:31:37 Re: [RFC] Interface of Row Level Security
Previous Message Robert Haas 2012-05-24 17:25:58 Re: [RFC] Interface of Row Level Security