Skip site navigation (1) Skip section navigation (2)

ecpg: fix amd64 warning/bug

From: Neil Conway <neilc(at)samurai(dot)com>
To: pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Cc: Michael Meskes <meskes(at)postgresql(dot)org>
Subject: ecpg: fix amd64 warning/bug
Date: 2006-01-15 02:42:40
Message-ID: 1137292960.9145.14.camel@localhost.localdomain (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
I see the following when compiling current sources on Linux/AMD64, gcc

% make -s
[...]src/interfaces/ecpg/ecpglib/descriptor.c: In function
[...]src/interfaces/ecpg/ecpglib/descriptor.c:509: warning: passing
argument 1 of 'ECPGget_variable' from incompatible pointer type

(Long paths shortened for brevity.) This seems to result from the patch
by Christof Petig that changes the signature of ECPGget_variable() on
certain platforms, "to work around gcc bug on powerpc and amd64.";r2=;r2=

Christof's patch updated execute.c and extern.h, but neglected to update
descriptor.c, resulting in the above warning (and I would imagine a
crash at runtime if this code is executed on AMD64/PPC, although I
haven't checked).

Attached is a patch that modifies the call to ECPG_get_variable() in
descriptor.c when compiled with GCC on AMD64 and PPC. Barring any
objections, I'll apply this to HEAD and the relevant stable branches
tomorrow or the day after.


Attachment: ecpg_amd64_va_list_bug-1.patch
Description: text/x-patch (576 bytes)


pgsql-patches by date

Next:From: Tom LaneDate: 2006-01-15 04:22:06
Subject: Re: ecpg: fix amd64 warning/bug
Previous:From: andrew5Date: 2006-01-14 22:54:17
Subject: BUG #2171: Differences compiling plpgsql in ecpg and psql

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group