Michal Soltys
2012-Feb-07 08:19 UTC
[syslinux] [PATCH] utils/isohybrid.c: use ULL on 64bit constants
At least some gcc versions will complain about it. Signed-off-by: Michal Soltys <soltys at ziu.info> --- utils/isohybrid.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/utils/isohybrid.c b/utils/isohybrid.c index 1dcbaa1..06c0de2 100644 --- a/utils/isohybrid.c +++ b/utils/isohybrid.c @@ -428,10 +428,10 @@ lendian_64(const uint64_t s) if (*(uint8_t *)&r) return s; - r = (s & 0x00000000000000FF) << 56 | (s & 0xFF00000000000000) >> 56 - | (s & 0x000000000000FF00) << 40 | (s & 0x00FF000000000000) >> 40 - | (s & 0x0000000000FF0000) << 24 | (s & 0x0000FF0000000000) >> 24 - | (s & 0x00000000FF000000) << 8 | (s & 0x000000FF00000000) >> 8; + r = (s & 0x00000000000000FFULL) << 56 | (s & 0xFF00000000000000ULL) >> 56 + | (s & 0x000000000000FF00ULL) << 40 | (s & 0x00FF000000000000ULL) >> 40 + | (s & 0x0000000000FF0000ULL) << 24 | (s & 0x0000FF0000000000ULL) >> 24 + | (s & 0x00000000FF000000ULL) << 8 | (s & 0x000000FF00000000ULL) >> 8; return r; } @@ -713,7 +713,7 @@ initialise_gpt(uint8_t *gpt, uint32_t current, uint32_t alternate, int primary) reverse_uuid(disk_uuid); } - header->signature = lendian_64(0x5452415020494645); + header->signature = lendian_64(0x5452415020494645ULL); header->revision = lendian_int(0x010000); header->headerSize = lendian_int(0x5c); header->currentLBA = lendian_64(current); -- 1.7.5.2