tsvector prints pointer difference as int

Started by Kris Jurkaover 18 years ago2 messagespatches
Jump to latest
#1Kris Jurka
books@ejurka.com

The tsvector code is printing a pointer difference as an integer,
generating the following warning:

tsvector.c: In function 'tsvectorin':
tsvector.c:225: warning: format '%d' expects type 'int', but argument 2
has type 'long int'

I was thinking the %td specifier wasn't well supported enough, so I simply
used long.

Kris Jurka

Attachments:

tsvector-ptrdiff-type.patchtext/plain; charset=US-ASCII; name=tsvector-ptrdiff-type.patchDownload+2-2
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Kris Jurka (#1)
Re: tsvector prints pointer difference as int

Kris Jurka <books@ejurka.com> writes:

The tsvector code is printing a pointer difference as an integer,
generating the following warning:
tsvector.c: In function 'tsvectorin':
tsvector.c:225: warning: format '%d' expects type 'int', but argument 2
has type 'long int'

I was thinking the %td specifier wasn't well supported enough, so I simply
used long.

Applied, thanks (and yes, %ld is what we generally use for this).

regards, tom lane