Re: MSVC compilers complain about snprintf - Mailing list pgsql-hackers

From Andres Freund
Subject Re: MSVC compilers complain about snprintf
Date
Msg-id 20181017213131.sytx4z6p6z5i2i3e@alap3.anarazel.de
Whole thread Raw
In response to MSVC compilers complain about snprintf  (Andrew Dunstan <andrew.dunstan@2ndquadrant.com>)
Responses Re: MSVC compilers complain about snprintf  (Andrew Dunstan <andrew.dunstan@2ndquadrant.com>)
List pgsql-hackers
Hi,

On 2018-10-17 17:27:14 -0400, Andrew Dunstan wrote:
> 
> The MSVC compilers are whingeing about recent changes in snprintf.c:
> 
> 
>    src\port\snprintf.c(1051): warning C4146: unary minus operator
>    applied to unsigned type, result still unsigned
> 
> 
> The line in question reads:
> 
>    uvalue = -(unsigned long long) value;

Yea, that's intended. Is there a way to silence that one, but just keep
the code largely similar?

Greetings,

Andres Freund


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: pgsql: Add TAP tests for pg_verify_checksums
Next
From: Peter Eisentraut
Date:
Subject: Re: Large writable variables