diff options
Diffstat (limited to 'locale')
-rw-r--r-- | locale/loadlocale.c | 2 | ||||
-rw-r--r-- | locale/programs/ld-collate.c | 20 |
2 files changed, 11 insertions, 11 deletions
diff --git a/locale/loadlocale.c b/locale/loadlocale.c index 4aacbc9d26..8c7afda8ea 100644 --- a/locale/loadlocale.c +++ b/locale/loadlocale.c @@ -217,7 +217,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category) } if (__builtin_expect (_nl_value_types[category][cnt] == word, 0)) { - assert (idx % 4 == 0); + assert (idx % __alignof__ (u_int32_t) == 0); newdata->values[cnt].word = *((u_int32_t *) (newdata->filedata + idx)); } diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c index da3cfa7744..d417c6670b 100644 --- a/locale/programs/ld-collate.c +++ b/locale/programs/ld-collate.c @@ -2204,21 +2204,21 @@ collate_output (struct localedef_t *locale, struct charmap_t *charmap, iov[2 + cnt].iov_base = NULL; iov[2 + cnt].iov_len = 0; idx[1 + cnt] = idx[cnt] + iov[2 + cnt].iov_len; - assert (idx[cnt] % 4 == 0); + assert (idx[cnt] % __alignof__ (int32_t) == 0); ++cnt; assert (cnt == _NL_ITEM_INDEX (_NL_COLLATE_GAP2)); iov[2 + cnt].iov_base = NULL; iov[2 + cnt].iov_len = 0; idx[1 + cnt] = idx[cnt] + iov[2 + cnt].iov_len; - assert (idx[cnt] % 4 == 0); + assert (idx[cnt] % __alignof__ (int32_t) == 0); ++cnt; assert (cnt == _NL_ITEM_INDEX (_NL_COLLATE_GAP3)); iov[2 + cnt].iov_base = NULL; iov[2 + cnt].iov_len = 0; idx[1 + cnt] = idx[cnt] + iov[2 + cnt].iov_len; - assert (idx[cnt] % 4 == 0); + assert (idx[cnt] % __alignof__ (int32_t) == 0); ++cnt; /* Since we are using the sign of an integer to mark indirection the @@ -2368,7 +2368,7 @@ collate_output (struct localedef_t *locale, struct charmap_t *charmap, iov[2 + cnt].iov_len = tablewc.result_size; idx[1 + cnt] = idx[cnt] + iov[2 + cnt].iov_len; assert (iov[2 + cnt].iov_len % sizeof (int32_t) == 0); - assert (idx[cnt] % 4 == 0); + assert (idx[cnt] % __alignof__ (int32_t) == 0); ++cnt; assert (cnt == _NL_ITEM_INDEX (_NL_COLLATE_WEIGHTWC)); @@ -2376,7 +2376,7 @@ collate_output (struct localedef_t *locale, struct charmap_t *charmap, iov[2 + cnt].iov_base = obstack_finish (&weightpool); idx[1 + cnt] = idx[cnt] + iov[2 + cnt].iov_len; assert (iov[2 + cnt].iov_len % sizeof (int32_t) == 0); - assert (idx[cnt] % 4 == 0); + assert (idx[cnt] % __alignof__ (int32_t) == 0); ++cnt; assert (cnt == _NL_ITEM_INDEX (_NL_COLLATE_EXTRAWC)); @@ -2384,7 +2384,7 @@ collate_output (struct localedef_t *locale, struct charmap_t *charmap, iov[2 + cnt].iov_base = obstack_finish (&extrapool); idx[1 + cnt] = idx[cnt] + iov[2 + cnt].iov_len; assert (iov[2 + cnt].iov_len % sizeof (int32_t) == 0); - assert (idx[cnt] % 4 == 0); + assert (idx[cnt] % __alignof__ (int32_t) == 0); ++cnt; assert (cnt == _NL_ITEM_INDEX (_NL_COLLATE_INDIRECTWC)); @@ -2392,7 +2392,7 @@ collate_output (struct localedef_t *locale, struct charmap_t *charmap, iov[2 + cnt].iov_base = obstack_finish (&indirectpool); idx[1 + cnt] = idx[cnt] + iov[2 + cnt].iov_len; assert (iov[2 + cnt].iov_len % sizeof (int32_t) == 0); - assert (idx[cnt] % 4 == 0); + assert (idx[cnt] % __alignof__ (int32_t) == 0); ++cnt; @@ -2493,14 +2493,14 @@ collate_output (struct localedef_t *locale, struct charmap_t *charmap, iov[2 + cnt].iov_base = &elem_size; iov[2 + cnt].iov_len = sizeof (int32_t); idx[1 + cnt] = idx[cnt] + iov[2 + cnt].iov_len; - assert (idx[cnt] % 4 == 0); + assert (idx[cnt] % __alignof__ (int32_t) == 0); ++cnt; assert (cnt == _NL_ITEM_INDEX (_NL_COLLATE_SYMB_TABLEMB)); iov[2 + cnt].iov_base = elem_table; iov[2 + cnt].iov_len = elem_size * 2 * sizeof (int32_t); idx[1 + cnt] = idx[cnt] + iov[2 + cnt].iov_len; - assert (idx[cnt] % 4 == 0); + assert (idx[cnt] % __alignof__ (int32_t) == 0); ++cnt; assert (cnt == _NL_ITEM_INDEX (_NL_COLLATE_SYMB_EXTRAMB)); @@ -2518,7 +2518,7 @@ collate_output (struct localedef_t *locale, struct charmap_t *charmap, assert (cnt == _NL_ITEM_INDEX (_NL_COLLATE_COLLSEQWC)); iov[2 + cnt].iov_base = collate->wcseqorder.result; iov[2 + cnt].iov_len = collate->wcseqorder.result_size; - assert (idx[cnt] % 4 == 0); + assert (idx[cnt] % __alignof__ (int32_t) == 0); ++cnt; assert (cnt == _NL_ITEM_INDEX (_NL_NUM_LC_COLLATE)); |