Re: Win64 warnings about size_t

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Win64 warnings about size_t
Date: 2010-01-02 11:17:42
Message-ID: 9837222c1001020317v7657e69ds79a2b4970e816176@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jan 2, 2010 at 03:13, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> Magnus Hagander wrote:
>> I have adapted the win64 patches a bit, and now have a working build.
>> As in it runs the regression tests fine. However, I have well over a
>> thousand warnings of the type:
>> conversion from 'size_t' to 'int', possible loss of data
>>
>> My first 5-6 checks of where these happen are all cases where we
>> assign the result of strlen() something to an int, or call a function
>> taking an int as parameter with the result of strlen() in there.
>>
>> strlen() returns size_t, which AFAICS is per the standard and not even
>> a Microsoft-specific idea. size_t is 8-bit - but it appears to be
>> 8-bit on Linux as well, when in 64-bit mode.
>
> Uh, you mean size_t is 8 _bytes_ on Win64?  That would make sense.

Yes, 8 bytes, 64 bit. Of course :-) Sorry.

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2010-01-02 11:24:49 Re: Change to config.pl processing in the msvc build environment
Previous Message Markus Wanner 2010-01-02 08:50:02 Re: Cancelling idle in transaction state