forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb5b3229
committed
Avoid -Wconversion warnings from direct use of GET_n_BYTES macros.
The GET/SET_n_BYTES macros are meant to be infrastructure for theDatumGetFoo/FooGetDatum macros, which include a cast to the intendedtarget type. Using them directly without a cast, as DatumGetFloat4and friends previously did, can yield warnings when -Wconversion is on.This is of little significance when building Postgres proper, becausethere are such a huge number of such warnings in the server that nobodywould think -Wconversion is of any use. But some extensions build with-Wconversion due to outside constraints. Commit14cca1b did a disserviceto those extensions by moving DatumGetFloat4 et al into postgres.h,where they can now cause warnings in extension builds.To fix, use DatumGetInt32 and friends in place of the low-level macros.This is arguably a bit cleaner anyway.Chapman FlackDiscussion:https://postgr.es/m/592E4D04.1070609@anastigmatix.net1 parent54e839f commitb5b3229
1 file changed
+4
-4
lines changedLines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
679 | 679 |
| |
680 | 680 |
| |
681 | 681 |
| |
682 |
| - | |
| 682 | + | |
683 | 683 |
| |
684 | 684 |
| |
685 | 685 |
| |
| |||
704 | 704 |
| |
705 | 705 |
| |
706 | 706 |
| |
707 |
| - | |
| 707 | + | |
708 | 708 |
| |
709 | 709 |
| |
710 | 710 |
| |
| |||
727 | 727 |
| |
728 | 728 |
| |
729 | 729 |
| |
730 |
| - | |
| 730 | + | |
731 | 731 |
| |
732 | 732 |
| |
733 | 733 |
| |
| |||
753 | 753 |
| |
754 | 754 |
| |
755 | 755 |
| |
756 |
| - | |
| 756 | + | |
757 | 757 |
| |
758 | 758 |
| |
759 | 759 |
| |
|
0 commit comments
Comments
(0)