summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko2022-02-06 20:07:12 +0100
committerDenys Vlasenko2022-02-06 20:07:12 +0100
commit987be932ed3cbea56b68bbe85649191c13b66015 (patch)
treee6bee7fb9dca0402f5ec97807a64c1c9938dd854
parentca466f385ac985a8b3491daa9f326dc480cdee70 (diff)
downloadbusybox-987be932ed3cbea56b68bbe85649191c13b66015.zip
busybox-987be932ed3cbea56b68bbe85649191c13b66015.tar.gz
*: slap on a few ALIGN_PTR where appropriate
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--coreutils/test.c2
-rw-r--r--e2fsprogs/fsck.c2
-rw-r--r--libbb/getopt32.c2
-rw-r--r--miscutils/devfsd.c4
-rw-r--r--modutils/modutils-24.c4
-rw-r--r--networking/inetd.c2
-rw-r--r--procps/nmeter.c2
-rw-r--r--selinux/setenforce.c2
-rw-r--r--shell/hush.c10
9 files changed, 15 insertions, 15 deletions
diff --git a/coreutils/test.c b/coreutils/test.c
index a914c74..840a0da 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 96c1e51..028f8a8 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 5ab4d66..e861d05 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 839d00f..fb9ebcf 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 ac86324..d0bc2a6 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 e71be51..fb2fbe3 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 2310e98..088d366 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 996034f..2267be4 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 6dc2eca..ae81f0d 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;