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

Commitfe4f36b

Browse files
committed
Fix compiler warning
Introduced in0aa8f76.MSVC warned about performing 32-bit bit shifting when it appeared like wemight like a 64-bit result. We did, but it just so happened that none ofthe calls to this function could have caused the 32-bit shift to overflow.Here we just cast the constant to int64 to make the compiler happy.Discussion:https://postgr.es/m/CAApHDvofA_vsrpC13mq_hZyuye5B-ssKEaer04OouXYCO5-uXQ@mail.gmail.com
1 parentf560209 commitfe4f36b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/backend/utils/adt/dbsize.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ numeric_shift_right(Numeric n, unsigned count)
627627
Datumdivisor_numeric;
628628
Datumresult;
629629

630-
divisor_numeric=NumericGetDatum(int64_to_numeric(1 <<count));
630+
divisor_numeric=NumericGetDatum(int64_to_numeric(((int64)1) <<count));
631631
result=DirectFunctionCall2(numeric_div_trunc,d,divisor_numeric);
632632
returnDatumGetNumeric(result);
633633
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp