pgsql: Fix some warnings (probably actual bugs) generated by new GSSAPI

Started by Tom Laneabout 19 years ago3 messagescomitters
Jump to latest
#1Tom Lane
tgl@sss.pgh.pa.us

Log Message:
-----------
Fix some warnings (probably actual bugs) generated by new GSSAPI code
when built on a 64-bit machine. Per buildfarm results extracted by Stefan.

Modified Files:
--------------
pgsql/src/backend/libpq:
auth.c (r1.152 -> r1.153)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/libpq/auth.c.diff?r1=1.152&r2=1.153)

#2Neil Conway
neilc@samurai.com
In reply to: Tom Lane (#1)
Re: pgsql: Fix some warnings (probably actual bugs) generated by new GSSAPI

On Thu, 2007-07-12 at 17:36 -0300, Tom Lane wrote:

Fix some warnings (probably actual bugs) generated by new GSSAPI code
when built on a 64-bit machine. Per buildfarm results extracted by Stefan.

Wouldn't it be more correct to cast size_t to unsigned long, rather than
unsigned int? Obviously getting GSS tokens larger than an unsigned int
is unlikely to say the least, so it's probably not a problem in
practice.

-Neil

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Neil Conway (#2)
Re: pgsql: Fix some warnings (probably actual bugs) generated by new GSSAPI

Neil Conway <neilc@samurai.com> writes:

On Thu, 2007-07-12 at 17:36 -0300, Tom Lane wrote:

Fix some warnings (probably actual bugs) generated by new GSSAPI code
when built on a 64-bit machine. Per buildfarm results extracted by Stefan.

Wouldn't it be more correct to cast size_t to unsigned long, rather than
unsigned int? Obviously getting GSS tokens larger than an unsigned int
is unlikely to say the least, so it's probably not a problem in
practice.

Feel free to change it if you want; I don't think it's an issue as long
as the cast matches the sprintf format.

regards, tom lane