diff options
| author | Helmut Eller | 2026-02-22 19:14:25 +0100 |
|---|---|---|
| committer | Helmut Eller | 2026-02-22 19:14:25 +0100 |
| commit | f29215c3d31d7b842bc1b7a9f5d15340b15d5d98 (patch) | |
| tree | d0a47693500d48bad1fd31ff1a6e1ca12c448ae2 | |
| parent | 5f0fdcdd1ccaceb7a7d4f878ec63f79dbeb5dc40 (diff) | |
| download | emacs-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.c | 6 |
1 files changed, 1 insertions, 5 deletions
| @@ -731,11 +731,7 @@ static void | |||
| 731 | set_header (union igc_header *h, enum igc_obj_type type, | 731 | set_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, |