Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7f284de

Browse files
committed
Disable MSVC warning caused by recent snprintf.c changes
Discussion:https://postgr.es/m/05f348de-0c79-d88d-69b7-434ef828bd4d@2ndQuadrant.com
1 parent450c7de commit7f284de

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

‎src/port/snprintf.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,11 +1046,19 @@ fmtint(long long value, char type, int forcesign, int leftjust,
10461046
return;/* keep compiler quiet */
10471047
}
10481048

1049+
/* disable MSVC warning about applying unary minus to an unsigned value */
1050+
#if_MSC_VER
1051+
#pragma warning(push)
1052+
#pragma warning(disable: 4146)
1053+
#endif
10491054
/* Handle +/- */
10501055
if (dosign&&adjust_sign((value<0),forcesign,&signvalue))
10511056
uvalue=-(unsigned long long)value;
10521057
else
10531058
uvalue= (unsigned long long)value;
1059+
#if_MSC_VER
1060+
#pragma warning(pop)
1061+
#endif
10541062

10551063
/*
10561064
* SUS: the result of converting 0 with an explicit precision of 0 is no

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp