From: | Stephen Frost <sfrost(at)snowman(dot)net> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: compiler warnings in copy.c |
Date: | 2015-01-28 20:05:11 |
Message-ID: | 20150128200511.GA3854@tamriel.snowman.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
* Robert Haas (robertmhaas(at)gmail(dot)com) wrote:
> My compiler is unhappy with the latest changes to copy.c:
>
> gcc -Wall -Wmissing-prototypes -Wpointer-arith
> -Wdeclaration-after-statement -Wendif-labels
> -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing
> -fwrapv -fexcess-precision=standard -g -O2 -Wall -Werror
> -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o
> copy.o copy.c -MMD -MP -MF .deps/copy.Po
> copy.c: In function ‘DoCopy’:
> copy.c:924:30: error: ‘rte’ may be used uninitialized in this function
> [-Werror=uninitialized]
> copy.c:793:17: note: ‘rte’ was declared here
> cc1: all warnings being treated as errors
Huh, interesting that mine didn't.
> >From what I can see, this is a pretty legitimate complaint. If
> stmt->relation == NULL, then rte never gets initialized, but we still
> do cstate->range_table = list_make1(rte). That can't be good.
Yeah, I'll fix that.
> Also, you seem to have pushed these commits with a date more than two
> weeks in the past. Please don't do that!
Oh, wow, sorry about that. I had expected a rebase to update the date.
Thanks!
Stephen
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2015-01-28 20:12:56 | Re: compiler warnings in copy.c |
Previous Message | Robert Haas | 2015-01-28 19:40:41 | compiler warnings in copy.c |