Re: pgsql: Fix blatantly broken record_image_cmp() logic for pass-by-value

From: Kevin Grittner <kgrittn(at)ymail(dot)com>
To: Kevin Grittner <kgrittn(at)ymail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-committers(at)postgresql(dot)org" <pgsql-committers(at)postgresql(dot)org>
Subject: Re: pgsql: Fix blatantly broken record_image_cmp() logic for pass-by-value
Date: 2013-11-08 22:33:50
Message-ID: 1383950030.7078.YahooMailNeo@web162903.mail.bf1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Kevin Grittner <kgrittn(at)ymail(dot)com> wrote:

> I distilled it down to the simplest case I could find which
> failed to produce the warning; attached.

For a compiler which seems to like to generate warnings for really
esoteric cases, clang falls down rather badly on uninitialized
variables -- at least on the package for Ubuntu 12.10.  It does not
complain at all about this:

int warning_test(int a);
int warning_test(int a)
{
    int result;

    if (a == 1)
        result = 1;

    return result;
}

I assume that everyone here agrees that merits a warning?

Bug reports filed.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2013-11-09 14:13:14 Re: pgsql: Fix pg_isolation_regress to work outside its build directory.
Previous Message Kevin Grittner 2013-11-08 21:19:58 Re: pgsql: Fix blatantly broken record_image_cmp() logic for pass-by-value

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-11-08 22:36:23 Re: Suggestion: Issue warning when calling SET TRANSACTION outside transaction block
Previous Message Peter Eisentraut 2013-11-08 22:11:58 Re: logical changeset generation v6.5