pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix type confusion in guc_var_compare() 7+ messages / 1 participants [nested] [flat]
* pgsql: Fix type confusion in guc_var_compare() @ 2024-07-15 16:40 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 7+ messages in thread From: Andres Freund @ 2024-07-15 16:40 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix type confusion in guc_var_compare() Before this change guc_var_compare() cast the input arguments to const struct config_generic *. That's not quite right however, as the input on one side is often just a char * on one side. Instead just use char *, the first field in config_generic. This fixes a -Warray-bounds warning with some versions of gcc. While the warning is only known to be triggered for <= 15, the issue the warning points out seems real, so apply the fix everywhere. Author: Nazir Bilal Yavuz <byavuz81@gmail.com> Reported-by: Erik Rijkers <er@xs4all.nl> Suggested-by: Andres Freund <andres@anarazel.de> Discussion: https://postgr.es/m/a74a1a0d-0fd2-3649-5224-4f754e8f91aa%40xs4all.nl Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/92f02c39c0facc817450a77bdff042dabe4aa6a3 Modified Files -------------- src/backend/utils/misc/guc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix type confusion in guc_var_compare() @ 2024-07-15 16:40 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 7+ messages in thread From: Andres Freund @ 2024-07-15 16:40 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix type confusion in guc_var_compare() Before this change guc_var_compare() cast the input arguments to const struct config_generic *. That's not quite right however, as the input on one side is often just a char * on one side. Instead just use char *, the first field in config_generic. This fixes a -Warray-bounds warning with some versions of gcc. While the warning is only known to be triggered for <= 15, the issue the warning points out seems real, so apply the fix everywhere. Author: Nazir Bilal Yavuz <byavuz81@gmail.com> Reported-by: Erik Rijkers <er@xs4all.nl> Suggested-by: Andres Freund <andres@anarazel.de> Discussion: https://postgr.es/m/a74a1a0d-0fd2-3649-5224-4f754e8f91aa%40xs4all.nl Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/2ad3b9350f7338b9ba0327ccd307a0fbba2208dc Modified Files -------------- src/backend/utils/misc/guc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix type confusion in guc_var_compare() @ 2024-07-15 16:40 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 7+ messages in thread From: Andres Freund @ 2024-07-15 16:40 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix type confusion in guc_var_compare() Before this change guc_var_compare() cast the input arguments to const struct config_generic *. That's not quite right however, as the input on one side is often just a char * on one side. Instead just use char *, the first field in config_generic. This fixes a -Warray-bounds warning with some versions of gcc. While the warning is only known to be triggered for <= 15, the issue the warning points out seems real, so apply the fix everywhere. Author: Nazir Bilal Yavuz <byavuz81@gmail.com> Reported-by: Erik Rijkers <er@xs4all.nl> Suggested-by: Andres Freund <andres@anarazel.de> Discussion: https://postgr.es/m/a74a1a0d-0fd2-3649-5224-4f754e8f91aa%40xs4all.nl Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/43cd30bcd1cd4f03bce207938f69a9dc190f1c48 Modified Files -------------- src/backend/utils/misc/guc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix type confusion in guc_var_compare() @ 2024-07-15 16:40 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 7+ messages in thread From: Andres Freund @ 2024-07-15 16:40 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix type confusion in guc_var_compare() Before this change guc_var_compare() cast the input arguments to const struct config_generic *. That's not quite right however, as the input on one side is often just a char * on one side. Instead just use char *, the first field in config_generic. This fixes a -Warray-bounds warning with some versions of gcc. While the warning is only known to be triggered for <= 15, the issue the warning points out seems real, so apply the fix everywhere. Author: Nazir Bilal Yavuz <byavuz81@gmail.com> Reported-by: Erik Rijkers <er@xs4all.nl> Suggested-by: Andres Freund <andres@anarazel.de> Discussion: https://postgr.es/m/a74a1a0d-0fd2-3649-5224-4f754e8f91aa%40xs4all.nl Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/2cf9bda76cfdef5b14345193e0d3abc5a43c9c31 Modified Files -------------- src/backend/utils/misc/guc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix type confusion in guc_var_compare() @ 2024-07-15 16:40 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 7+ messages in thread From: Andres Freund @ 2024-07-15 16:40 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix type confusion in guc_var_compare() Before this change guc_var_compare() cast the input arguments to const struct config_generic *. That's not quite right however, as the input on one side is often just a char * on one side. Instead just use char *, the first field in config_generic. This fixes a -Warray-bounds warning with some versions of gcc. While the warning is only known to be triggered for <= 15, the issue the warning points out seems real, so apply the fix everywhere. Author: Nazir Bilal Yavuz <byavuz81@gmail.com> Reported-by: Erik Rijkers <er@xs4all.nl> Suggested-by: Andres Freund <andres@anarazel.de> Discussion: https://postgr.es/m/a74a1a0d-0fd2-3649-5224-4f754e8f91aa%40xs4all.nl Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/b9f3db23b7b5c7f522162e16482b096d9c930f80 Modified Files -------------- src/backend/utils/misc/guc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix type confusion in guc_var_compare() @ 2024-07-15 16:40 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 7+ messages in thread From: Andres Freund @ 2024-07-15 16:40 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix type confusion in guc_var_compare() Before this change guc_var_compare() cast the input arguments to const struct config_generic *. That's not quite right however, as the input on one side is often just a char * on one side. Instead just use char *, the first field in config_generic. This fixes a -Warray-bounds warning with some versions of gcc. While the warning is only known to be triggered for <= 15, the issue the warning points out seems real, so apply the fix everywhere. Author: Nazir Bilal Yavuz <byavuz81@gmail.com> Reported-by: Erik Rijkers <er@xs4all.nl> Suggested-by: Andres Freund <andres@anarazel.de> Discussion: https://postgr.es/m/a74a1a0d-0fd2-3649-5224-4f754e8f91aa%40xs4all.nl Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/9b047cc0b2c22b667d5452124a381b33d5a9ff4a Modified Files -------------- src/backend/utils/misc/guc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix type confusion in guc_var_compare() @ 2024-07-15 16:40 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 7+ messages in thread From: Andres Freund @ 2024-07-15 16:40 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix type confusion in guc_var_compare() Before this change guc_var_compare() cast the input arguments to const struct config_generic *. That's not quite right however, as the input on one side is often just a char * on one side. Instead just use char *, the first field in config_generic. This fixes a -Warray-bounds warning with some versions of gcc. While the warning is only known to be triggered for <= 15, the issue the warning points out seems real, so apply the fix everywhere. Author: Nazir Bilal Yavuz <byavuz81@gmail.com> Reported-by: Erik Rijkers <er@xs4all.nl> Suggested-by: Andres Freund <andres@anarazel.de> Discussion: https://postgr.es/m/a74a1a0d-0fd2-3649-5224-4f754e8f91aa%40xs4all.nl Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/ee89c4fa4b184bd2cc2a2b48fc13f474e6aa2a24 Modified Files -------------- src/backend/utils/misc/guc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2024-07-15 16:40 UTC | newest] Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2024-07-15 16:40 pgsql: Fix type confusion in guc_var_compare() Andres Freund <andres@anarazel.de> 2024-07-15 16:40 pgsql: Fix type confusion in guc_var_compare() Andres Freund <andres@anarazel.de> 2024-07-15 16:40 pgsql: Fix type confusion in guc_var_compare() Andres Freund <andres@anarazel.de> 2024-07-15 16:40 pgsql: Fix type confusion in guc_var_compare() Andres Freund <andres@anarazel.de> 2024-07-15 16:40 pgsql: Fix type confusion in guc_var_compare() Andres Freund <andres@anarazel.de> 2024-07-15 16:40 pgsql: Fix type confusion in guc_var_compare() Andres Freund <andres@anarazel.de> 2024-07-15 16:40 pgsql: Fix type confusion in guc_var_compare() Andres Freund <andres@anarazel.de>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox