* [PATCH 0/2] incompatible-poiner-types bug fixes
@ 2023-12-10 21:49 Nicholas Vinson
2023-12-10 22:45 ` Bart Schaefer
0 siblings, 1 reply; 4+ messages in thread
From: Nicholas Vinson @ 2023-12-10 21:49 UTC (permalink / raw)
To: zsh-workers; +Cc: Nicholas Vinson
This patch series fixes several bugs found by compiling with
-Werror=incompatible-pointer-types. This setting will be gcc's default
behavior starting with gcc-14.
See:
https://wiki.gentoo.org/wiki/Modern_C_porting#What_changed.3F
https://inbox.sourceware.org/gcc-patches/cover.1700473918.git.fweimer@redhat.com/
for details.
Nicholas Vinson (2):
Fix incompatible-pointer-types bugs
Fix incompatible-pointer-types configure test bugs
Src/Modules/termcap.c | 36 ++++++++++++++++++++----------------
configure.ac | 12 ++++++------
2 files changed, 26 insertions(+), 22 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] incompatible-poiner-types bug fixes
2023-12-10 21:49 [PATCH 0/2] incompatible-poiner-types bug fixes Nicholas Vinson
@ 2023-12-10 22:45 ` Bart Schaefer
2023-12-10 23:31 ` Nicholas Vinson
0 siblings, 1 reply; 4+ messages in thread
From: Bart Schaefer @ 2023-12-10 22:45 UTC (permalink / raw)
To: Nicholas Vinson; +Cc: zsh-workers
On Sun, Dec 10, 2023 at 1:50 PM Nicholas Vinson <nvinson234@gmail.com> wrote:
>
> This patch series fixes several bugs found by compiling with
> -Werror=incompatible-pointer-types.
We've already got a patch for this from Florian Weimer
<fweimer@redhat.com> in workers/52383. Is the zboolcodes naming and
BOOLCODES define in Src/Modules/termcap.c actually necessary?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] incompatible-poiner-types bug fixes
2023-12-10 22:45 ` Bart Schaefer
@ 2023-12-10 23:31 ` Nicholas Vinson
2023-12-11 23:55 ` Oliver Kiddle
0 siblings, 1 reply; 4+ messages in thread
From: Nicholas Vinson @ 2023-12-10 23:31 UTC (permalink / raw)
To: Bart Schaefer; +Cc: zsh-workers
If configure incorrectly decides (or is incorrectly told) that boolcodes
or numcodes do not exist, you end up with a naming conflict at
compile-time. This happened while I was testing my changes. I suspect,
but don't know for sure, that this also happened at some point with
strcodes since the handling of that variable is different than how
boolcodes and numcodes are handled. Regardless, the naming change
prevents the naming conflict, and the defines prevent added complexity
on the for-loops and simplifies the strcodes for-loop handling.
Moreover, these changes align the handling of all three variables,
boolcodes, numcodes, strcodes, in a type-safe and name-safe manner.
Thanks,
Nicholas Vinson
On 12/10/23 17:45, Bart Schaefer wrote:
> On Sun, Dec 10, 2023 at 1:50 PM Nicholas Vinson <nvinson234@gmail.com> wrote:
>> This patch series fixes several bugs found by compiling with
>> -Werror=incompatible-pointer-types.
> We've already got a patch for this from Florian Weimer
> <fweimer@redhat.com> in workers/52383. Is the zboolcodes naming and
> BOOLCODES define in Src/Modules/termcap.c actually necessary?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] incompatible-poiner-types bug fixes
2023-12-10 23:31 ` Nicholas Vinson
@ 2023-12-11 23:55 ` Oliver Kiddle
0 siblings, 0 replies; 4+ messages in thread
From: Oliver Kiddle @ 2023-12-11 23:55 UTC (permalink / raw)
To: Nicholas Vinson; +Cc: Bart Schaefer, zsh-workers
Nicholas Vinson wrote:
> If configure incorrectly decides (or is incorrectly told) that boolcodes
> or numcodes do not exist, you end up with a naming conflict at
> compile-time. This happened while I was testing my changes. I suspect,
It may be for the best that we get errors if configure has got things
wrong.
> Moreover, these changes align the handling of all three variables,
> boolcodes, numcodes, strcodes, in a type-safe and name-safe manner.
If adding const makes the code align with ncurses then that could be
useful. But the #defines seem ugly and unnecessary.
Oliver
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-12-11 23:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-10 21:49 [PATCH 0/2] incompatible-poiner-types bug fixes Nicholas Vinson
2023-12-10 22:45 ` Bart Schaefer
2023-12-10 23:31 ` Nicholas Vinson
2023-12-11 23:55 ` Oliver Kiddle
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).