diff --git a/coreutils/test.c b/coreutils/test.c index a914c7490..840a0daaf 100644 --- a/coreutils/test.c +++ b/coreutils/test.c @@ -242,7 +242,7 @@ int depth; depth--; \ return __res; \ } while (0) -static const char *const TOKSTR[] = { +static const char *const TOKSTR[] ALIGN_PTR = { "EOI", "FILRD", "FILWR", diff --git a/e2fsprogs/fsck.c b/e2fsprogs/fsck.c index 96c1e51e0..028f8a803 100644 --- a/e2fsprogs/fsck.c +++ b/e2fsprogs/fsck.c @@ -190,7 +190,7 @@ struct globals { * Required for the uber-silly devfs /dev/ide/host1/bus2/target3/lun3 * pathames. */ -static const char *const devfs_hier[] = { +static const char *const devfs_hier[] ALIGN_PTR = { "host", "bus", "target", "lun", NULL }; #endif diff --git a/libbb/getopt32.c b/libbb/getopt32.c index 5ab4d66f1..e861d0567 100644 --- a/libbb/getopt32.c +++ b/libbb/getopt32.c @@ -296,7 +296,7 @@ Special characters: /* Code here assumes that 'unsigned' is at least 32 bits wide */ -const char *const bb_argv_dash[] = { "-", NULL }; +const char *const bb_argv_dash[] ALIGN_PTR = { "-", NULL }; enum { PARAM_STRING, diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c index 839d00fd0..fb9ebcf60 100644 --- a/miscutils/devfsd.c +++ b/miscutils/devfsd.c @@ -928,7 +928,7 @@ static void action_compat(const struct devfsd_notify_struct *info, unsigned int unsigned int i; char rewind_; /* 1 to 5 "scsi/" , 6 to 9 "ide/host" */ - static const char *const fmt[] = { + static const char *const fmt[] ALIGN_PTR = { NULL , "sg/c%db%dt%du%d", /* scsi/generic */ "sd/c%db%dt%du%d", /* scsi/disc */ @@ -1468,7 +1468,7 @@ const char *get_old_name(const char *devname, unsigned int namelen, const char *pty1; const char *pty2; /* 1 to 5 "scsi/" , 6 to 9 "ide/host", 10 sbp/, 11 vcc/, 12 pty/ */ - static const char *const fmt[] = { + static const char *const fmt[] ALIGN_PTR = { NULL , "sg%u", /* scsi/generic */ NULL, /* scsi/disc */ diff --git a/modutils/modutils-24.c b/modutils/modutils-24.c index ac8632481..d0bc2a6ef 100644 --- a/modutils/modutils-24.c +++ b/modutils/modutils-24.c @@ -3458,7 +3458,7 @@ static int obj_load_progbits(char *image, size_t image_size, struct obj_file *f, static void hide_special_symbols(struct obj_file *f) { - static const char *const specials[] = { + static const char *const specials[] ALIGN_PTR = { SPFX "cleanup_module", SPFX "init_module", SPFX "kernel_version", @@ -3484,7 +3484,7 @@ static int obj_gpl_license(struct obj_file *f, const char **license) * linux/include/linux/module.h. Checking for leading "GPL" will not * work, somebody will use "GPL sucks, this is proprietary". */ - static const char *const gpl_licenses[] = { + static const char *const gpl_licenses[] ALIGN_PTR = { "GPL", "GPL v2", "GPL and additional rights", diff --git a/networking/inetd.c b/networking/inetd.c index e71be51c3..fb2fbe323 100644 --- a/networking/inetd.c +++ b/networking/inetd.c @@ -1538,7 +1538,7 @@ int inetd_main(int argc UNUSED_PARAM, char **argv) #if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_ECHO \ || ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD # if !BB_MMU -static const char *const cat_args[] = { "cat", NULL }; +static const char *const cat_args[] ALIGN_PTR = { "cat", NULL }; # endif #endif diff --git a/procps/nmeter.c b/procps/nmeter.c index 2310e9844..088d366bf 100644 --- a/procps/nmeter.c +++ b/procps/nmeter.c @@ -70,7 +70,7 @@ typedef struct proc_file { smallint last_gen; } proc_file; -static const char *const proc_name[] = { +static const char *const proc_name[] ALIGN_PTR = { "stat", // Must match the order of proc_file's! "loadavg", "net/dev", diff --git a/selinux/setenforce.c b/selinux/setenforce.c index 996034f8e..2267be451 100644 --- a/selinux/setenforce.c +++ b/selinux/setenforce.c @@ -26,7 +26,7 @@ /* These strings are arranged so that odd ones * result in security_setenforce(1) being done, * the rest will do security_setenforce(0) */ -static const char *const setenforce_cmd[] = { +static const char *const setenforce_cmd[] ALIGN_PTR = { "0", "1", "permissive", diff --git a/shell/hush.c b/shell/hush.c index 6dc2ecaac..ae81f0da5 100644 --- a/shell/hush.c +++ b/shell/hush.c @@ -564,7 +564,7 @@ enum { #define NULL_O_STRING { NULL } #ifndef debug_printf_parse -static const char *const assignment_flag[] = { +static const char *const assignment_flag[] ALIGN_PTR = { "MAYBE_ASSIGNMENT", "DEFINITELY_ASSIGNMENT", "NOT_ASSIGNMENT", @@ -3682,7 +3682,7 @@ static void free_pipe_list(struct pipe *pi) #ifndef debug_print_tree static void debug_print_tree(struct pipe *pi, int lvl) { - static const char *const PIPE[] = { + static const char *const PIPE[] ALIGN_PTR = { [PIPE_SEQ] = "SEQ", [PIPE_AND] = "AND", [PIPE_OR ] = "OR" , @@ -3717,7 +3717,7 @@ static void debug_print_tree(struct pipe *pi, int lvl) [RES_XXXX ] = "XXXX" , [RES_SNTX ] = "SNTX" , }; - static const char *const CMDTYPE[] = { + static const char *const CMDTYPE[] ALIGN_PTR = { "{}", "()", "[noglob]", @@ -7659,7 +7659,7 @@ static int generate_stream_from_string(const char *s, pid_t *pid_p) if (is_prefixed_with(s, "trap") && skip_whitespace(s + 4)[0] == '\0' ) { - static const char *const argv[] = { NULL, NULL }; + static const char *const argv[] ALIGN_PTR = { NULL, NULL }; builtin_trap((char**)argv); fflush_all(); /* important */ _exit(0); @@ -9826,7 +9826,7 @@ static int run_list(struct pipe *pi) static const char encoded_dollar_at[] ALIGN1 = { SPECIAL_VAR_SYMBOL, '@' | 0x80, SPECIAL_VAR_SYMBOL, '\0' }; /* encoded representation of "$@" */ - static const char *const encoded_dollar_at_argv[] = { + static const char *const encoded_dollar_at_argv[] ALIGN_PTR = { encoded_dollar_at, NULL }; /* argv list with one element: "$@" */ char **vals;