*: slap on a few ALIGN_PTR where appropriate

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2022-02-06 20:07:12 +01:00
parent ca466f385a
commit 987be932ed
9 changed files with 15 additions and 15 deletions

View File

@ -242,7 +242,7 @@ int depth;
depth--; \ depth--; \
return __res; \ return __res; \
} while (0) } while (0)
static const char *const TOKSTR[] = { static const char *const TOKSTR[] ALIGN_PTR = {
"EOI", "EOI",
"FILRD", "FILRD",
"FILWR", "FILWR",

View File

@ -190,7 +190,7 @@ struct globals {
* Required for the uber-silly devfs /dev/ide/host1/bus2/target3/lun3 * Required for the uber-silly devfs /dev/ide/host1/bus2/target3/lun3
* pathames. * pathames.
*/ */
static const char *const devfs_hier[] = { static const char *const devfs_hier[] ALIGN_PTR = {
"host", "bus", "target", "lun", NULL "host", "bus", "target", "lun", NULL
}; };
#endif #endif

View File

@ -296,7 +296,7 @@ Special characters:
/* Code here assumes that 'unsigned' is at least 32 bits wide */ /* 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 { enum {
PARAM_STRING, PARAM_STRING,

View File

@ -928,7 +928,7 @@ static void action_compat(const struct devfsd_notify_struct *info, unsigned int
unsigned int i; unsigned int i;
char rewind_; char rewind_;
/* 1 to 5 "scsi/" , 6 to 9 "ide/host" */ /* 1 to 5 "scsi/" , 6 to 9 "ide/host" */
static const char *const fmt[] = { static const char *const fmt[] ALIGN_PTR = {
NULL , NULL ,
"sg/c%db%dt%du%d", /* scsi/generic */ "sg/c%db%dt%du%d", /* scsi/generic */
"sd/c%db%dt%du%d", /* scsi/disc */ "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 *pty1;
const char *pty2; const char *pty2;
/* 1 to 5 "scsi/" , 6 to 9 "ide/host", 10 sbp/, 11 vcc/, 12 pty/ */ /* 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 , NULL ,
"sg%u", /* scsi/generic */ "sg%u", /* scsi/generic */
NULL, /* scsi/disc */ NULL, /* scsi/disc */

View File

@ -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 void hide_special_symbols(struct obj_file *f)
{ {
static const char *const specials[] = { static const char *const specials[] ALIGN_PTR = {
SPFX "cleanup_module", SPFX "cleanup_module",
SPFX "init_module", SPFX "init_module",
SPFX "kernel_version", 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 * linux/include/linux/module.h. Checking for leading "GPL" will not
* work, somebody will use "GPL sucks, this is proprietary". * 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",
"GPL v2", "GPL v2",
"GPL and additional rights", "GPL and additional rights",

View File

@ -1538,7 +1538,7 @@ int inetd_main(int argc UNUSED_PARAM, char **argv)
#if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_ECHO \ #if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_ECHO \
|| ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD || ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD
# if !BB_MMU # if !BB_MMU
static const char *const cat_args[] = { "cat", NULL }; static const char *const cat_args[] ALIGN_PTR = { "cat", NULL };
# endif # endif
#endif #endif

View File

@ -70,7 +70,7 @@ typedef struct proc_file {
smallint last_gen; smallint last_gen;
} proc_file; } 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! "stat", // Must match the order of proc_file's!
"loadavg", "loadavg",
"net/dev", "net/dev",

View File

@ -26,7 +26,7 @@
/* These strings are arranged so that odd ones /* These strings are arranged so that odd ones
* result in security_setenforce(1) being done, * result in security_setenforce(1) being done,
* the rest will do security_setenforce(0) */ * the rest will do security_setenforce(0) */
static const char *const setenforce_cmd[] = { static const char *const setenforce_cmd[] ALIGN_PTR = {
"0", "0",
"1", "1",
"permissive", "permissive",

View File

@ -564,7 +564,7 @@ enum {
#define NULL_O_STRING { NULL } #define NULL_O_STRING { NULL }
#ifndef debug_printf_parse #ifndef debug_printf_parse
static const char *const assignment_flag[] = { static const char *const assignment_flag[] ALIGN_PTR = {
"MAYBE_ASSIGNMENT", "MAYBE_ASSIGNMENT",
"DEFINITELY_ASSIGNMENT", "DEFINITELY_ASSIGNMENT",
"NOT_ASSIGNMENT", "NOT_ASSIGNMENT",
@ -3682,7 +3682,7 @@ static void free_pipe_list(struct pipe *pi)
#ifndef debug_print_tree #ifndef debug_print_tree
static void debug_print_tree(struct pipe *pi, int lvl) 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_SEQ] = "SEQ",
[PIPE_AND] = "AND", [PIPE_AND] = "AND",
[PIPE_OR ] = "OR" , [PIPE_OR ] = "OR" ,
@ -3717,7 +3717,7 @@ static void debug_print_tree(struct pipe *pi, int lvl)
[RES_XXXX ] = "XXXX" , [RES_XXXX ] = "XXXX" ,
[RES_SNTX ] = "SNTX" , [RES_SNTX ] = "SNTX" ,
}; };
static const char *const CMDTYPE[] = { static const char *const CMDTYPE[] ALIGN_PTR = {
"{}", "{}",
"()", "()",
"[noglob]", "[noglob]",
@ -7659,7 +7659,7 @@ static int generate_stream_from_string(const char *s, pid_t *pid_p)
if (is_prefixed_with(s, "trap") if (is_prefixed_with(s, "trap")
&& skip_whitespace(s + 4)[0] == '\0' && 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); builtin_trap((char**)argv);
fflush_all(); /* important */ fflush_all(); /* important */
_exit(0); _exit(0);
@ -9826,7 +9826,7 @@ static int run_list(struct pipe *pi)
static const char encoded_dollar_at[] ALIGN1 = { static const char encoded_dollar_at[] ALIGN1 = {
SPECIAL_VAR_SYMBOL, '@' | 0x80, SPECIAL_VAR_SYMBOL, '\0' SPECIAL_VAR_SYMBOL, '@' | 0x80, SPECIAL_VAR_SYMBOL, '\0'
}; /* encoded representation of "$@" */ }; /* 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 encoded_dollar_at, NULL
}; /* argv list with one element: "$@" */ }; /* argv list with one element: "$@" */
char **vals; char **vals;