From 6dafd9a01d1b230fbdbd6748d74f868506371282 Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Sat, 30 Nov 2024 09:06:55 +0900 Subject: [PATCH] fix assertion error on AIX --- Objects/unicodeobject.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index ab4f07ed054385..85cfc202ca002f 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -5022,13 +5022,13 @@ ctz(size_t v) static size_t load_unaligned(const unsigned char *p, size_t size) { - assert(size <= SIZEOF_SIZE_T); union { size_t s; unsigned char b[SIZEOF_SIZE_T]; } u; u.s = 0; switch (size) { + default: case 8: u.b[7] = p[7]; _Py_FALLTHROUGH; @@ -5055,8 +5055,6 @@ load_unaligned(const unsigned char *p, size_t size) break; case 0: break; - default: - Py_UNREACHABLE(); } return u.s; }