Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
c/shared/source/t1write/t1write.c: fix u8/u16 type mismatch on derefe…
…rence (gcc-14) Upcoming `gcc-14` enabled a few warnings into errors, like `-Wincompatible-pointer-types`. This caused `afdko` build to fail as: /build/afdko/c/shared/source/t1write/t1write.c: In function ‘saveCstr’: /build/afdko/c/shared/source/t1write/t1write.c:348:28: error: passing argument 3 of ‘writeTmp’ from incompatible pointer type [-Wincompatible-pointer-types] 348 | if (writeTmp(h, 1, &info->iFD)) | ^~~~~~~~~~ | | | uint16_t * {aka short unsigned int *} The code attempts to use only one byte of 16-bit value. The code very likely is broken on a big-endian system. The change explicitly truncates 16-bit value down to 8 bit value to retain existing behaviour on both BE and LE systems.