aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHelmut Eller2026-02-22 19:14:25 +0100
committerHelmut Eller2026-02-22 19:14:25 +0100
commitf29215c3d31d7b842bc1b7a9f5d15340b15d5d98 (patch)
treed0a47693500d48bad1fd31ff1a6e1ca12c448ae2
parent5f0fdcdd1ccaceb7a7d4f878ec63f79dbeb5dc40 (diff)
downloademacs-feature/igc2.tar.gz
emacs-feature/igc2.zip
Simplify set_header a bit.feature/igc2
* src/igc.c (set_header): Use uint64_t to avoid compiler warnings on 32-bit targets.
-rw-r--r--src/igc.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/igc.c b/src/igc.c
index 6489221baa5..b413005aec4 100644
--- a/src/igc.c
+++ b/src/igc.c
@@ -731,11 +731,7 @@ static void
731set_header (union igc_header *h, enum igc_obj_type type, 731set_header (union igc_header *h, enum igc_obj_type type,
732 mps_word_t nbytes, mps_word_t hash) 732 mps_word_t nbytes, mps_word_t hash)
733{ 733{
734#if IGC_HEADER_NWORDS_BITS >= 32 && INTPTR_MAX > INT_MAX 734 igc_assert (nbytes < ((uint64_t) 1 << IGC_HEADER_NWORDS_BITS));
735 /* On 32-bit architecture the assertion below is redundant and
736 causes compiler warnings. */
737 igc_assert (nbytes < ((size_t) 1 << IGC_HEADER_NWORDS_BITS));
738#endif
739 igc_assert (type == IGC_OBJ_PAD 735 igc_assert (type == IGC_OBJ_PAD
740 || nbytes >= sizeof (struct igc_fwd)); 736 || nbytes >= sizeof (struct igc_fwd));
741 union igc_header val = { .s = { .tag = IGC_TAG_OBJ, 737 union igc_header val = { .s = { .tag = IGC_TAG_OBJ,