simon-git: charset (main): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Mon Oct 4 18:04:05 BST 2021
TL;DR:
cadc277 gcc warning fix: cast function pointers via void (*)(void).
7858df7 gcc warning fix: mark deliberate case fallthroughs.
10975d5 gcc warning fixes relating to integer types.
0bcab4b gcc warning fix: add missing break in read_iso2022.
Repository: https://git.tartarus.org/simon/charset.git
On the web: https://git.tartarus.org/?p=simon/charset.git
Branch updated: main
Committer: Simon Tatham <anakin at pobox.com>
Date: 2021-10-04 18:04:05
commit cadc2777f7fe2007a0503049fe8180522d09faf0
web diff https://git.tartarus.org/?p=simon/charset.git;a=commitdiff;h=cadc2777f7fe2007a0503049fe8180522d09faf0;hp=443a213a2de5929fbf40744880f01cdab3aeb9f9
Author: Simon Tatham <anakin at pobox.com>
Date: Mon Oct 4 12:49:43 2021 +0100
gcc warning fix: cast function pointers via void (*)(void).
If you cast between any other two function pointers, gcc will
apparently give a warning on the basis that you might not have meant
it. In this case I _did_ mean it - and I have my own type checking in
place to make reasonably sure of that - so I suppress gcc's warning by
detouring through what _it_ thinks is the 'I did this on purpose'
function type.
iso2022.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
commit 7858df7b49d35f6f04902527541f16a4ed9cb03c
web diff https://git.tartarus.org/?p=simon/charset.git;a=commitdiff;h=7858df7b49d35f6f04902527541f16a4ed9cb03c;hp=cadc2777f7fe2007a0503049fe8180522d09faf0
Author: Simon Tatham <anakin at pobox.com>
Date: Mon Oct 4 12:50:58 2021 +0100
gcc warning fix: mark deliberate case fallthroughs.
gcc has an attribute for this, so that it can warn about it when you
didn't provide the attribute.
internal.h | 6 ++++++
iso2022.c | 1 +
iso2022s.c | 2 +-
3 files changed, 8 insertions(+), 1 deletion(-)
commit 10975d586cf85a797688c7d285b9c1db456a1de3
web diff https://git.tartarus.org/?p=simon/charset.git;a=commitdiff;h=10975d586cf85a797688c7d285b9c1db456a1de3;hp=7858df7b49d35f6f04902527541f16a4ed9cb03c
Author: Simon Tatham <anakin at pobox.com>
Date: Mon Oct 4 12:51:30 2021 +0100
gcc warning fixes relating to integer types.
Casual comparison of int against size_t tends to give warnings these
days. Be a bit more careful about which types we're using where.
confuse.c | 2 +-
convcs.c | 4 ++--
csshow.c | 3 ++-
cstable.c | 3 ++-
4 files changed, 7 insertions(+), 5 deletions(-)
commit 0bcab4bd82e99601609ba48287c5f8418f9cc56b
web diff https://git.tartarus.org/?p=simon/charset.git;a=commitdiff;h=0bcab4bd82e99601609ba48287c5f8418f9cc56b;hp=10975d586cf85a797688c7d285b9c1db456a1de3
Author: Simon Tatham <anakin at pobox.com>
Date: Mon Oct 4 18:01:46 2021 +0100
gcc warning fix: add missing break in read_iso2022.
This would cause us to fall through from the ESC $ ... handler into
the ESC % ... handler.
As far as I can tell it was benign, because the i2=='/' case of that
handler would exit DOCS mode (and therefore make no difference),
whereas the i2==0 case of that handler couldn't happen because the
case we fell through from handled i2==0 by resetting i2 to '(' which
the secondary case would ignore.
But even so, that's not what we _meant_ to do!
iso2022.c | 1 +
1 file changed, 1 insertion(+)
More information about the tartarus-commits
mailing list