neondatabase / postgres

PostgreSQL in Neon
https://neon.tech/docs/reference/compatibility
27 stars 12 forks source link

Fix -Warray-bounds warning in guc_var_compare() function #431

Open rahulinux opened 5 months ago

rahulinux commented 5 months ago

There are a couple of places that guc_var_compare() function takes 'const char **' type and then casts it to the 'const struct config_generic ' type. This triggers '-Warray-bounds' warning. So, instead cast them to the 'const char *' type.

Ref: https://www.postgresql.org/message-id/attachment/160118/v1-0001-Fix-Warray-bounds-warning-in-guc_var_compare-func.patch

Similar PR for v15: https://github.com/neondatabase/postgres/pull/432

kelvich commented 5 months ago

@hlinnaka are you ok with committing this right away (blocker for debian bookworm): https://www.postgresql.org/message-id/flat/a74a1a0d-0fd2-3649-5224-4f754e8f91aa%40xs4all.nl ?

@rahulinux can you also open similar PR to REL_15_STABLE_neon too? I assume that v16 don't have this problem, right?

rahulinux commented 5 months ago

@rahulinux can you also open similar PR to REL_15_STABLE_neon too? I assume that v16 don't have this problem, right?

Yes, added here: https://github.com/neondatabase/postgres/pull/432