forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit2fe7a6d
committed
Fix pointer cast for seed calculation on 32-bit systems
The fallback seed for when pg_strong_random cannot generate a highquality seed mixes in the address of the conn object, but the castfailed to take the word size into consideration. Fix by casting toa uintptr_t instead. The seed calculation was added in7f5b198.The code as it stood generated the following warning on mamba andlapwing in the buildfarm:fe-connect.c: In function 'libpq_prng_init':fe-connect.c:1048:11: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]1048 | rseed = ((uint64) conn) ^ | ^Author: Hayato Kuroda <kuroda.hayato@fujitsu.com>Discussion:https://postgr.es/m/TYAPR01MB58665250EDCD551CCA9AD117F58E9@TYAPR01MB5866.jpnprd01.prod.outlook.com1 parent261cf89 commit2fe7a6d
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1045 | 1045 |
| |
1046 | 1046 |
| |
1047 | 1047 |
| |
1048 |
| - | |
| 1048 | + | |
1049 | 1049 |
| |
1050 | 1050 |
| |
1051 | 1051 |
| |
|
0 commit comments
Comments
(0)