diff options
119 files changed, 494 insertions, 447 deletions
@@ -569,7 +569,7 @@ busybox-all := $(core-y) $(libs-y) | |||
569 | # May be overridden by arch/$(ARCH)/Makefile | 569 | # May be overridden by arch/$(ARCH)/Makefile |
570 | quiet_cmd_busybox__ ?= LINK $@ | 570 | quiet_cmd_busybox__ ?= LINK $@ |
571 | cmd_busybox__ ?= $(srctree)/scripts/trylink $(CC) $(LDFLAGS) \ | 571 | cmd_busybox__ ?= $(srctree)/scripts/trylink $(CC) $(LDFLAGS) \ |
572 | -o $@ -Wl,-M \ | 572 | -o $@ -Wl,-Map -Wl,$@.map \ |
573 | -Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \ | 573 | -Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \ |
574 | -Wl,--start-group $(busybox-all) -Wl,--end-group \ | 574 | -Wl,--start-group $(busybox-all) -Wl,--end-group \ |
575 | $(LDLIBS) | 575 | $(LDLIBS) |
diff --git a/applets/Kbuild b/applets/Kbuild index e6c5bd506..cf7d29751 100644 --- a/applets/Kbuild +++ b/applets/Kbuild | |||
@@ -20,6 +20,6 @@ quiet_cmd_gen_usage_compressed = GEN include/usage_compressed.h | |||
20 | HOSTCFLAGS_usage.o = -I$(srctree)/include | 20 | HOSTCFLAGS_usage.o = -I$(srctree)/include |
21 | 21 | ||
22 | applets/applets.o: include/usage_compressed.h | 22 | applets/applets.o: include/usage_compressed.h |
23 | applets/usage: .config | 23 | applets/usage: .config $(srctree)/applets/usage_compressed |
24 | include/usage_compressed.h: applets/usage | 24 | include/usage_compressed.h: applets/usage $(srctree)/applets/usage_compressed |
25 | $(call cmd,gen_usage_compressed) | 25 | $(call cmd,gen_usage_compressed) |
diff --git a/applets/applets.c b/applets/applets.c index 89dea3e6a..6ff4301e4 100644 --- a/applets/applets.c +++ b/applets/applets.c | |||
@@ -34,7 +34,7 @@ | |||
34 | 34 | ||
35 | #if ENABLE_SHOW_USAGE && !ENABLE_FEATURE_COMPRESS_USAGE | 35 | #if ENABLE_SHOW_USAGE && !ENABLE_FEATURE_COMPRESS_USAGE |
36 | /* Define usage_messages[] */ | 36 | /* Define usage_messages[] */ |
37 | static const char usage_messages[] = "" | 37 | static const char usage_messages[] ALIGN1 = "" |
38 | #define MAKE_USAGE | 38 | #define MAKE_USAGE |
39 | #include "usage.h" | 39 | #include "usage.h" |
40 | #include "applets.h" | 40 | #include "applets.h" |
@@ -108,12 +108,12 @@ static char *get_trimmed_slice(char *s, char *e) | |||
108 | } | 108 | } |
109 | 109 | ||
110 | /* Don't depend on the tools to combine strings. */ | 110 | /* Don't depend on the tools to combine strings. */ |
111 | static const char config_file[] = "/etc/busybox.conf"; | 111 | static const char config_file[] ALIGN1 = "/etc/busybox.conf"; |
112 | 112 | ||
113 | /* We don't supply a value for the nul, so an index adjustment is | 113 | /* We don't supply a value for the nul, so an index adjustment is |
114 | * necessary below. Also, we use unsigned short here to save some | 114 | * necessary below. Also, we use unsigned short here to save some |
115 | * space even though these are really mode_t values. */ | 115 | * space even though these are really mode_t values. */ |
116 | static const unsigned short mode_mask[] = { | 116 | static const unsigned short mode_mask[] ALIGN2 = { |
117 | /* SST sst xxx --- */ | 117 | /* SST sst xxx --- */ |
118 | S_ISUID, S_ISUID|S_IXUSR, S_IXUSR, 0, /* user */ | 118 | S_ISUID, S_ISUID|S_IXUSR, S_IXUSR, 0, /* user */ |
119 | S_ISGID, S_ISGID|S_IXGRP, S_IXGRP, 0, /* group */ | 119 | S_ISGID, S_ISGID|S_IXGRP, S_IXGRP, 0, /* group */ |
@@ -255,7 +255,7 @@ static void parse_config_file(void) | |||
255 | 255 | ||
256 | for (i = 0; i < 3; i++) { | 256 | for (i = 0; i < 3; i++) { |
257 | /* There are 4 chars + 1 nul for each of user/group/other. */ | 257 | /* There are 4 chars + 1 nul for each of user/group/other. */ |
258 | static const char mode_chars[] = "Ssx-\0" "Ssx-\0" "Ttx-"; | 258 | static const char mode_chars[] ALIGN1 = "Ssx-\0" "Ssx-\0" "Ttx-"; |
259 | 259 | ||
260 | const char *q; | 260 | const char *q; |
261 | q = strchrnul(mode_chars + 5*i, *e++); | 261 | q = strchrnul(mode_chars + 5*i, *e++); |
@@ -499,8 +499,8 @@ static void install_links(const char *busybox, int use_symbolic_links) | |||
499 | /* directory table | 499 | /* directory table |
500 | * this should be consistent w/ the enum, | 500 | * this should be consistent w/ the enum, |
501 | * busybox.h::bb_install_loc_t, or else... */ | 501 | * busybox.h::bb_install_loc_t, or else... */ |
502 | static const char usr_bin [] = "/usr/bin"; | 502 | static const char usr_bin [] ALIGN1 = "/usr/bin"; |
503 | static const char usr_sbin[] = "/usr/sbin"; | 503 | static const char usr_sbin[] ALIGN1 = "/usr/sbin"; |
504 | static const char *const install_dir[] = { | 504 | static const char *const install_dir[] = { |
505 | &usr_bin [8], /* "", equivalent to "/" for concat_path_file() */ | 505 | &usr_bin [8], /* "", equivalent to "/" for concat_path_file() */ |
506 | &usr_bin [4], /* "/bin" */ | 506 | &usr_bin [4], /* "/bin" */ |
diff --git a/applets/usage_compressed b/applets/usage_compressed index fd581cc66..9da683088 100755 --- a/applets/usage_compressed +++ b/applets/usage_compressed | |||
@@ -12,7 +12,7 @@ sz=`"$loc/usage" | wc -c` || exit 1 | |||
12 | 12 | ||
13 | exec >"$target" | 13 | exec >"$target" |
14 | 14 | ||
15 | echo 'static const char packed_usage[] = ' | 15 | echo 'static const char packed_usage[] ALIGN1 = ' |
16 | "$loc/usage" | bzip2 -1 | od -v -t x1 \ | 16 | "$loc/usage" | bzip2 -1 | od -v -t x1 \ |
17 | | $SED -e 's/^[^ ]*//' -e 's/ *\(..\)/\\x\1/g' -e 's/^\(.*\)$/"\1"/' | 17 | | $SED -e 's/^[^ ]*//' -e 's/ *\(..\)/\\x\1/g' -e 's/^\(.*\)$/"\1"/' |
18 | echo ';' | 18 | echo ';' |
diff --git a/archival/ar.c b/archival/ar.c index e85ca5c6f..7b16c2b59 100644 --- a/archival/ar.c +++ b/archival/ar.c | |||
@@ -41,10 +41,11 @@ static void header_verbose_list_ar(const file_header_t *file_header) | |||
41 | int ar_main(int argc, char **argv); | 41 | int ar_main(int argc, char **argv); |
42 | int ar_main(int argc, char **argv) | 42 | int ar_main(int argc, char **argv) |
43 | { | 43 | { |
44 | static const char msg_unsupported_err[] ALIGN1 = | ||
45 | "archive %s is not supported"; | ||
46 | |||
44 | archive_handle_t *archive_handle; | 47 | archive_handle_t *archive_handle; |
45 | unsigned opt; | 48 | unsigned opt; |
46 | static const char msg_unsupported_err[] = | ||
47 | "Archive %s not supported. Install binutils 'ar'."; | ||
48 | char magic[8]; | 49 | char magic[8]; |
49 | 50 | ||
50 | archive_handle = init_handle(); | 51 | archive_handle = init_handle(); |
@@ -88,7 +89,8 @@ int ar_main(int argc, char **argv) | |||
88 | } | 89 | } |
89 | archive_handle->offset += 7; | 90 | archive_handle->offset += 7; |
90 | 91 | ||
91 | while (get_header_ar(archive_handle) == EXIT_SUCCESS) /* repeat */; | 92 | while (get_header_ar(archive_handle) == EXIT_SUCCESS) |
93 | continue; | ||
92 | 94 | ||
93 | return EXIT_SUCCESS; | 95 | return EXIT_SUCCESS; |
94 | } | 96 | } |
diff --git a/archival/dpkg.c b/archival/dpkg.c index bd729a2a9..0c1f96fc9 100644 --- a/archival/dpkg.c +++ b/archival/dpkg.c | |||
@@ -582,7 +582,8 @@ static int read_package_field(const char *package_buffer, char **field_name, cha | |||
582 | 582 | ||
583 | static unsigned fill_package_struct(char *control_buffer) | 583 | static unsigned fill_package_struct(char *control_buffer) |
584 | { | 584 | { |
585 | static const char field_names[] = "Package\0""Version\0" | 585 | static const char field_names[] ALIGN1 = |
586 | "Package\0""Version\0" | ||
586 | "Pre-Depends\0""Depends\0""Replaces\0""Provides\0" | 587 | "Pre-Depends\0""Depends\0""Replaces\0""Provides\0" |
587 | "Conflicts\0""Suggests\0""Recommends\0""Enhances\0"; | 588 | "Conflicts\0""Suggests\0""Recommends\0""Enhances\0"; |
588 | 589 | ||
@@ -1226,7 +1227,7 @@ static int run_package_script(const char *package_name, const char *script_type) | |||
1226 | return result; | 1227 | return result; |
1227 | } | 1228 | } |
1228 | 1229 | ||
1229 | static const char *all_control_files[] = { | 1230 | static const char *const all_control_files[] = { |
1230 | "preinst", "postinst", "prerm", "postrm", | 1231 | "preinst", "postinst", "prerm", "postrm", |
1231 | "list", "md5sums", "shlibs", "conffiles", | 1232 | "list", "md5sums", "shlibs", "conffiles", |
1232 | "config", "templates", NULL | 1233 | "config", "templates", NULL |
diff --git a/archival/gzip.c b/archival/gzip.c index 08c660e40..83d78e47c 100644 --- a/archival/gzip.c +++ b/archival/gzip.c | |||
@@ -768,26 +768,24 @@ static void check_match(IPos start, IPos match, int length) | |||
768 | #define BL_CODES 19 | 768 | #define BL_CODES 19 |
769 | /* number of codes used to transfer the bit lengths */ | 769 | /* number of codes used to transfer the bit lengths */ |
770 | 770 | ||
771 | typedef uch extra_bits_t; | ||
772 | |||
773 | /* extra bits for each length code */ | 771 | /* extra bits for each length code */ |
774 | static const extra_bits_t extra_lbits[LENGTH_CODES]= { | 772 | static const uint8_t extra_lbits[LENGTH_CODES] ALIGN1 = { |
775 | 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, | 773 | 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, |
776 | 4, 4, 5, 5, 5, 5, 0 | 774 | 4, 4, 5, 5, 5, 5, 0 |
777 | }; | 775 | }; |
778 | 776 | ||
779 | /* extra bits for each distance code */ | 777 | /* extra bits for each distance code */ |
780 | static const extra_bits_t extra_dbits[D_CODES] = { | 778 | static const uint8_t extra_dbits[D_CODES] ALIGN1 = { |
781 | 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, | 779 | 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, |
782 | 10, 10, 11, 11, 12, 12, 13, 13 | 780 | 10, 10, 11, 11, 12, 12, 13, 13 |
783 | }; | 781 | }; |
784 | 782 | ||
785 | /* extra bits for each bit length code */ | 783 | /* extra bits for each bit length code */ |
786 | static const extra_bits_t extra_blbits[BL_CODES] = { | 784 | static const uint8_t extra_blbits[BL_CODES] ALIGN1 = { |
787 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7 }; | 785 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7 }; |
788 | 786 | ||
789 | /* number of codes at each bit length for an optimal tree */ | 787 | /* number of codes at each bit length for an optimal tree */ |
790 | static const uch bl_order[BL_CODES] = { | 788 | static const uint8_t bl_order[BL_CODES] ALIGN1 = { |
791 | 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 }; | 789 | 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 }; |
792 | 790 | ||
793 | #define STORED_BLOCK 0 | 791 | #define STORED_BLOCK 0 |
@@ -861,7 +859,7 @@ typedef struct ct_data { | |||
861 | typedef struct tree_desc { | 859 | typedef struct tree_desc { |
862 | ct_data *dyn_tree; /* the dynamic tree */ | 860 | ct_data *dyn_tree; /* the dynamic tree */ |
863 | ct_data *static_tree; /* corresponding static tree or NULL */ | 861 | ct_data *static_tree; /* corresponding static tree or NULL */ |
864 | const extra_bits_t *extra_bits; /* extra bits for each code or NULL */ | 862 | const uint8_t *extra_bits; /* extra bits for each code or NULL */ |
865 | int extra_base; /* base index for extra_bits */ | 863 | int extra_base; /* base index for extra_bits */ |
866 | int elems; /* max number of elements in the tree */ | 864 | int elems; /* max number of elements in the tree */ |
867 | int max_length; /* max bit length for the codes */ | 865 | int max_length; /* max bit length for the codes */ |
@@ -1064,7 +1062,7 @@ static void pqdownheap(ct_data * tree, int k) | |||
1064 | static void gen_bitlen(tree_desc * desc) | 1062 | static void gen_bitlen(tree_desc * desc) |
1065 | { | 1063 | { |
1066 | ct_data *tree = desc->dyn_tree; | 1064 | ct_data *tree = desc->dyn_tree; |
1067 | const extra_bits_t *extra = desc->extra_bits; | 1065 | const uint8_t *extra = desc->extra_bits; |
1068 | int base = desc->extra_base; | 1066 | int base = desc->extra_base; |
1069 | int max_code = desc->max_code; | 1067 | int max_code = desc->max_code; |
1070 | int max_length = desc->max_length; | 1068 | int max_length = desc->max_length; |
diff --git a/archival/libunarchive/decompress_unzip.c b/archival/libunarchive/decompress_unzip.c index c698763d3..ead628ed5 100644 --- a/archival/libunarchive/decompress_unzip.c +++ b/archival/libunarchive/decompress_unzip.c | |||
@@ -182,39 +182,39 @@ static state_t* alloc_state(void) | |||
182 | #endif | 182 | #endif |
183 | 183 | ||
184 | 184 | ||
185 | static const unsigned short mask_bits[] = { | 185 | static const unsigned short mask_bits[] ALIGN2 = { |
186 | 0x0000, 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, | 186 | 0x0000, 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, |
187 | 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff | 187 | 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff |
188 | }; | 188 | }; |
189 | 189 | ||
190 | /* Copy lengths for literal codes 257..285 */ | 190 | /* Copy lengths for literal codes 257..285 */ |
191 | static const unsigned short cplens[] = { | 191 | static const unsigned short cplens[] ALIGN2 = { |
192 | 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, | 192 | 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, |
193 | 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0 | 193 | 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0 |
194 | }; | 194 | }; |
195 | 195 | ||
196 | /* note: see note #13 above about the 258 in this list. */ | 196 | /* note: see note #13 above about the 258 in this list. */ |
197 | /* Extra bits for literal codes 257..285 */ | 197 | /* Extra bits for literal codes 257..285 */ |
198 | static const unsigned char cplext[] = { | 198 | static const unsigned char cplext[] ALIGN1 = { |
199 | 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, | 199 | 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, |
200 | 5, 5, 5, 0, 99, 99 | 200 | 5, 5, 5, 0, 99, 99 |
201 | }; /* 99 == invalid */ | 201 | }; /* 99 == invalid */ |
202 | 202 | ||
203 | /* Copy offsets for distance codes 0..29 */ | 203 | /* Copy offsets for distance codes 0..29 */ |
204 | static const unsigned short cpdist[] = { | 204 | static const unsigned short cpdist[] ALIGN2 = { |
205 | 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, | 205 | 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, |
206 | 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577 | 206 | 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577 |
207 | }; | 207 | }; |
208 | 208 | ||
209 | /* Extra bits for distance codes */ | 209 | /* Extra bits for distance codes */ |
210 | static const unsigned char cpdext[] = { | 210 | static const unsigned char cpdext[] ALIGN1 = { |
211 | 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, | 211 | 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, |
212 | 11, 11, 12, 12, 13, 13 | 212 | 11, 11, 12, 12, 13, 13 |
213 | }; | 213 | }; |
214 | 214 | ||
215 | /* Tables for deflate from PKZIP's appnote.txt. */ | 215 | /* Tables for deflate from PKZIP's appnote.txt. */ |
216 | /* Order of the bit length code lengths */ | 216 | /* Order of the bit length code lengths */ |
217 | static const unsigned char border[] = { | 217 | static const unsigned char border[] ALIGN1 = { |
218 | 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 | 218 | 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 |
219 | }; | 219 | }; |
220 | 220 | ||
diff --git a/archival/tar.c b/archival/tar.c index 7d7bf79d6..bed8cf24c 100644 --- a/archival/tar.c +++ b/archival/tar.c | |||
@@ -715,7 +715,7 @@ enum { | |||
715 | OPT_NOPRESERVE_PERM = 1 << OPTBIT_NOPRESERVE_PERM, // no-same-permissions | 715 | OPT_NOPRESERVE_PERM = 1 << OPTBIT_NOPRESERVE_PERM, // no-same-permissions |
716 | }; | 716 | }; |
717 | #if ENABLE_FEATURE_TAR_LONG_OPTIONS | 717 | #if ENABLE_FEATURE_TAR_LONG_OPTIONS |
718 | static const char tar_longopts[] = | 718 | static const char tar_longopts[] ALIGN1 = |
719 | "list\0" No_argument "t" | 719 | "list\0" No_argument "t" |
720 | "extract\0" No_argument "x" | 720 | "extract\0" No_argument "x" |
721 | "directory\0" Required_argument "C" | 721 | "directory\0" Required_argument "C" |
diff --git a/console-tools/setconsole.c b/console-tools/setconsole.c index 5908dad48..a9bbc78d5 100644 --- a/console-tools/setconsole.c +++ b/console-tools/setconsole.c | |||
@@ -11,7 +11,7 @@ | |||
11 | #include "libbb.h" | 11 | #include "libbb.h" |
12 | 12 | ||
13 | #if ENABLE_FEATURE_SETCONSOLE_LONG_OPTIONS | 13 | #if ENABLE_FEATURE_SETCONSOLE_LONG_OPTIONS |
14 | static const char setconsole_longopts[] = | 14 | static const char setconsole_longopts[] ALIGN1 = |
15 | "reset\0" No_argument "r" | 15 | "reset\0" No_argument "r" |
16 | ; | 16 | ; |
17 | #endif | 17 | #endif |
diff --git a/coreutils/cal.c b/coreutils/cal.c index f8fc0b0d3..37aca00bb 100644 --- a/coreutils/cal.c +++ b/coreutils/cal.c | |||
@@ -30,11 +30,11 @@ | |||
30 | #define MAXDAYS 42 /* max slots in a month array */ | 30 | #define MAXDAYS 42 /* max slots in a month array */ |
31 | #define SPACE -1 /* used in day array */ | 31 | #define SPACE -1 /* used in day array */ |
32 | 32 | ||
33 | static const unsigned char days_in_month[] = { | 33 | static const unsigned char days_in_month[] ALIGN1 = { |
34 | 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 | 34 | 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 |
35 | }; | 35 | }; |
36 | 36 | ||
37 | static const unsigned char sep1752[] = { | 37 | static const unsigned char sep1752[] ALIGN1 = { |
38 | 1, 2, 14, 15, 16, | 38 | 1, 2, 14, 15, 16, |
39 | 17, 18, 19, 20, 21, 22, 23, | 39 | 17, 18, 19, 20, 21, 22, 23, |
40 | 24, 25, 26, 27, 28, 29, 30 | 40 | 24, 25, 26, 27, 28, 29, 30 |
diff --git a/coreutils/cut.c b/coreutils/cut.c index 435b21070..2598a9a7c 100644 --- a/coreutils/cut.c +++ b/coreutils/cut.c | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | 16 | ||
17 | /* option vars */ | 17 | /* option vars */ |
18 | static const char optstring[] = "b:c:f:d:sn"; | 18 | static const char optstring[] ALIGN1 = "b:c:f:d:sn"; |
19 | #define CUT_OPT_BYTE_FLGS (1<<0) | 19 | #define CUT_OPT_BYTE_FLGS (1<<0) |
20 | #define CUT_OPT_CHAR_FLGS (1<<1) | 20 | #define CUT_OPT_CHAR_FLGS (1<<1) |
21 | #define CUT_OPT_FIELDS_FLGS (1<<2) | 21 | #define CUT_OPT_FIELDS_FLGS (1<<2) |
@@ -163,7 +163,7 @@ static void cut_file(FILE * file) | |||
163 | } | 163 | } |
164 | } | 164 | } |
165 | 165 | ||
166 | static const char _op_on_field[] = " only when operating on fields"; | 166 | static const char _op_on_field[] ALIGN1 = " only when operating on fields"; |
167 | 167 | ||
168 | int cut_main(int argc, char **argv); | 168 | int cut_main(int argc, char **argv); |
169 | int cut_main(int argc, char **argv) | 169 | int cut_main(int argc, char **argv) |
diff --git a/coreutils/date.c b/coreutils/date.c index 5e2bcee3b..5ee70f703 100644 --- a/coreutils/date.c +++ b/coreutils/date.c | |||
@@ -63,8 +63,9 @@ int date_main(int argc, char **argv) | |||
63 | if (!isofmt_arg) { | 63 | if (!isofmt_arg) { |
64 | ifmt = 0; /* default is date */ | 64 | ifmt = 0; /* default is date */ |
65 | } else { | 65 | } else { |
66 | static const char * const isoformats[] = | 66 | static const char *const isoformats[] = { |
67 | { "date", "hours", "minutes", "seconds" }; | 67 | "date", "hours", "minutes", "seconds" |
68 | }; | ||
68 | 69 | ||
69 | for (ifmt = 0; ifmt < 4; ifmt++) | 70 | for (ifmt = 0; ifmt < 4; ifmt++) |
70 | if (!strcmp(isofmt_arg, isoformats[ifmt])) | 71 | if (!strcmp(isofmt_arg, isoformats[ifmt])) |
diff --git a/coreutils/dd.c b/coreutils/dd.c index 3b4b1d785..b17bb5969 100644 --- a/coreutils/dd.c +++ b/coreutils/dd.c | |||
@@ -46,7 +46,7 @@ static void dd_output_status(int ATTRIBUTE_UNUSED cur_signal) | |||
46 | } | 46 | } |
47 | 47 | ||
48 | static ssize_t full_write_or_warn(int fd, const void *buf, size_t len, | 48 | static ssize_t full_write_or_warn(int fd, const void *buf, size_t len, |
49 | const char * const filename) | 49 | const char *const filename) |
50 | { | 50 | { |
51 | ssize_t n = full_write(fd, buf, len); | 51 | ssize_t n = full_write(fd, buf, len); |
52 | if (n < 0) | 52 | if (n < 0) |
@@ -83,7 +83,7 @@ int dd_main(int argc, char **argv) | |||
83 | FLAG_TWOBUFS = 1 << 3, | 83 | FLAG_TWOBUFS = 1 << 3, |
84 | FLAG_COUNT = 1 << 4, | 84 | FLAG_COUNT = 1 << 4, |
85 | }; | 85 | }; |
86 | static const char keywords[] = | 86 | static const char keywords[] ALIGN1 = |
87 | "bs=\0""count=\0""seek=\0""skip=\0""if=\0""of=\0" | 87 | "bs=\0""count=\0""seek=\0""skip=\0""if=\0""of=\0" |
88 | #if ENABLE_FEATURE_DD_IBS_OBS | 88 | #if ENABLE_FEATURE_DD_IBS_OBS |
89 | "ibs=\0""obs=\0""conv=\0""notrunc\0""sync\0""noerror\0" | 89 | "ibs=\0""obs=\0""conv=\0""notrunc\0""sync\0""noerror\0" |
diff --git a/coreutils/df.c b/coreutils/df.c index 82730806e..5154eeb45 100644 --- a/coreutils/df.c +++ b/coreutils/df.c | |||
@@ -42,7 +42,8 @@ int df_main(int argc, char **argv) | |||
42 | FILE *mount_table; | 42 | FILE *mount_table; |
43 | struct mntent *mount_entry; | 43 | struct mntent *mount_entry; |
44 | struct statfs s; | 44 | struct statfs s; |
45 | static const char hdr_1k[] = "1k-blocks"; /* default display is kilobytes */ | 45 | /* default display is kilobytes */ |
46 | static const char hdr_1k[] ALIGN1 = "1k-blocks"; | ||
46 | const char *disp_units_hdr = hdr_1k; | 47 | const char *disp_units_hdr = hdr_1k; |
47 | 48 | ||
48 | #ifdef CONFIG_FEATURE_HUMAN_READABLE | 49 | #ifdef CONFIG_FEATURE_HUMAN_READABLE |
diff --git a/coreutils/du.c b/coreutils/du.c index cb3e715d9..19748719a 100644 --- a/coreutils/du.c +++ b/coreutils/du.c | |||
@@ -48,7 +48,7 @@ static int one_file_system; | |||
48 | static dev_t dir_dev; | 48 | static dev_t dir_dev; |
49 | 49 | ||
50 | 50 | ||
51 | static void print(long size, const char * const filename) | 51 | static void print(long size, const char *const filename) |
52 | { | 52 | { |
53 | /* TODO - May not want to defer error checking here. */ | 53 | /* TODO - May not want to defer error checking here. */ |
54 | #if ENABLE_FEATURE_HUMAN_READABLE | 54 | #if ENABLE_FEATURE_HUMAN_READABLE |
@@ -64,7 +64,7 @@ static void print(long size, const char * const filename) | |||
64 | } | 64 | } |
65 | 65 | ||
66 | /* tiny recursive du */ | 66 | /* tiny recursive du */ |
67 | static long du(const char * const filename) | 67 | static long du(const char *const filename) |
68 | { | 68 | { |
69 | struct stat statbuf; | 69 | struct stat statbuf; |
70 | long sum; | 70 | long sum; |
diff --git a/coreutils/env.c b/coreutils/env.c index 3008358ec..dc8667181 100644 --- a/coreutils/env.c +++ b/coreutils/env.c | |||
@@ -35,7 +35,7 @@ extern char **environ; | |||
35 | #include "libbb.h" | 35 | #include "libbb.h" |
36 | 36 | ||
37 | #if ENABLE_FEATURE_ENV_LONG_OPTIONS | 37 | #if ENABLE_FEATURE_ENV_LONG_OPTIONS |
38 | static const char env_longopts[] = | 38 | static const char env_longopts[] ALIGN1 = |
39 | "ignore-environment\0" No_argument "i" | 39 | "ignore-environment\0" No_argument "i" |
40 | "unset\0" Required_argument "u" | 40 | "unset\0" Required_argument "u" |
41 | ; | 41 | ; |
diff --git a/coreutils/expr.c b/coreutils/expr.c index 6a4683d90..318fee721 100644 --- a/coreutils/expr.c +++ b/coreutils/expr.c | |||
@@ -277,7 +277,7 @@ static VALUE *eval7(void) | |||
277 | 277 | ||
278 | static VALUE *eval6(void) | 278 | static VALUE *eval6(void) |
279 | { | 279 | { |
280 | static const char keywords[] = | 280 | static const char keywords[] ALIGN1 = |
281 | "quote\0""length\0""match\0""index\0""substr\0"; | 281 | "quote\0""length\0""match\0""index\0""substr\0"; |
282 | 282 | ||
283 | VALUE *r, *i1, *i2; | 283 | VALUE *r, *i1, *i2; |
diff --git a/coreutils/head.c b/coreutils/head.c index bffba4043..a48f147a2 100644 --- a/coreutils/head.c +++ b/coreutils/head.c | |||
@@ -13,7 +13,7 @@ | |||
13 | 13 | ||
14 | #include "libbb.h" | 14 | #include "libbb.h" |
15 | 15 | ||
16 | static const char head_opts[] = | 16 | static const char head_opts[] ALIGN1 = |
17 | "n:" | 17 | "n:" |
18 | #if ENABLE_FEATURE_FANCY_HEAD | 18 | #if ENABLE_FEATURE_FANCY_HEAD |
19 | "c:qv" | 19 | "c:qv" |
@@ -29,7 +29,7 @@ static const struct suffix_mult head_suffixes[] = { | |||
29 | }; | 29 | }; |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | static const char header_fmt_str[] = "\n==> %s <==\n"; | 32 | static const char header_fmt_str[] ALIGN1 = "\n==> %s <==\n"; |
33 | 33 | ||
34 | int head_main(int argc, char **argv); | 34 | int head_main(int argc, char **argv); |
35 | int head_main(int argc, char **argv) | 35 | int head_main(int argc, char **argv) |
diff --git a/coreutils/install.c b/coreutils/install.c index c2638f492..79cd02036 100644 --- a/coreutils/install.c +++ b/coreutils/install.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #include "libcoreutils/coreutils.h" | 16 | #include "libcoreutils/coreutils.h" |
17 | 17 | ||
18 | #if ENABLE_FEATURE_INSTALL_LONG_OPTIONS | 18 | #if ENABLE_FEATURE_INSTALL_LONG_OPTIONS |
19 | static const char install_longopts[] = | 19 | static const char install_longopts[] ALIGN1 = |
20 | "directory\0" No_argument "d" | 20 | "directory\0" No_argument "d" |
21 | "preserve-timestamps\0" No_argument "p" | 21 | "preserve-timestamps\0" No_argument "p" |
22 | "strip\0" No_argument "s" | 22 | "strip\0" No_argument "s" |
diff --git a/coreutils/ls.c b/coreutils/ls.c index 920fad85e..2b2925557 100644 --- a/coreutils/ls.c +++ b/coreutils/ls.c | |||
@@ -120,7 +120,7 @@ SPLIT_SUBDIR = 2, | |||
120 | static smallint show_color; | 120 | static smallint show_color; |
121 | /* long option entry used only for --color, which has no short option | 121 | /* long option entry used only for --color, which has no short option |
122 | * equivalent */ | 122 | * equivalent */ |
123 | static const char ls_color_opt[] = | 123 | static const char ls_color_opt[] ALIGN1 = |
124 | "color\0" Optional_argument "\xff" /* no short equivalent */ | 124 | "color\0" Optional_argument "\xff" /* no short equivalent */ |
125 | ; | 125 | ; |
126 | #else | 126 | #else |
@@ -710,7 +710,8 @@ static int list_single(struct dnode *dn) | |||
710 | /* "[-]SXvThw", GNU options, busybox optionally supports */ | 710 | /* "[-]SXvThw", GNU options, busybox optionally supports */ |
711 | /* "[-]K", SELinux mandated options, busybox optionally supports */ | 711 | /* "[-]K", SELinux mandated options, busybox optionally supports */ |
712 | /* "[-]e", I think we made this one up */ | 712 | /* "[-]e", I think we made this one up */ |
713 | static const char ls_options[] = "Cadil1gnsxAk" | 713 | static const char ls_options[] ALIGN1 = |
714 | "Cadil1gnsxAk" | ||
714 | USE_FEATURE_LS_TIMESTAMPS("cetu") | 715 | USE_FEATURE_LS_TIMESTAMPS("cetu") |
715 | USE_FEATURE_LS_SORTFILES("SXrv") | 716 | USE_FEATURE_LS_SORTFILES("SXrv") |
716 | USE_FEATURE_LS_FILETYPES("Fp") | 717 | USE_FEATURE_LS_FILETYPES("Fp") |
diff --git a/coreutils/mkdir.c b/coreutils/mkdir.c index a6eaa9612..22a070c31 100644 --- a/coreutils/mkdir.c +++ b/coreutils/mkdir.c | |||
@@ -25,7 +25,7 @@ | |||
25 | /* This is a NOFORK applet. Be very careful! */ | 25 | /* This is a NOFORK applet. Be very careful! */ |
26 | 26 | ||
27 | #if ENABLE_FEATURE_MKDIR_LONG_OPTIONS | 27 | #if ENABLE_FEATURE_MKDIR_LONG_OPTIONS |
28 | static const char mkdir_longopts[] = | 28 | static const char mkdir_longopts[] ALIGN1 = |
29 | "mode\0" Required_argument "m" | 29 | "mode\0" Required_argument "m" |
30 | "parents\0" No_argument "p" | 30 | "parents\0" No_argument "p" |
31 | #if ENABLE_SELINUX | 31 | #if ENABLE_SELINUX |
diff --git a/coreutils/mknod.c b/coreutils/mknod.c index 415ef55c1..ea6f24ae6 100644 --- a/coreutils/mknod.c +++ b/coreutils/mknod.c | |||
@@ -14,7 +14,7 @@ | |||
14 | #include "libbb.h" | 14 | #include "libbb.h" |
15 | #include "libcoreutils/coreutils.h" | 15 | #include "libcoreutils/coreutils.h" |
16 | 16 | ||
17 | static const char modes_chars[] = { 'p', 'c', 'u', 'b', 0, 1, 1, 2 }; | 17 | static const char modes_chars[] ALIGN1 = { 'p', 'c', 'u', 'b', 0, 1, 1, 2 }; |
18 | static const mode_t modes_cubp[] = { S_IFIFO, S_IFCHR, S_IFBLK }; | 18 | static const mode_t modes_cubp[] = { S_IFIFO, S_IFCHR, S_IFBLK }; |
19 | 19 | ||
20 | int mknod_main(int argc, char **argv); | 20 | int mknod_main(int argc, char **argv); |
diff --git a/coreutils/mv.c b/coreutils/mv.c index 064407838..4cd0fcfba 100644 --- a/coreutils/mv.c +++ b/coreutils/mv.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #include "libcoreutils/coreutils.h" | 21 | #include "libcoreutils/coreutils.h" |
22 | 22 | ||
23 | #if ENABLE_FEATURE_MV_LONG_OPTIONS | 23 | #if ENABLE_FEATURE_MV_LONG_OPTIONS |
24 | static const char mv_longopts[] = | 24 | static const char mv_longopts[] ALIGN1 = |
25 | "interactive\0" No_argument "i" | 25 | "interactive\0" No_argument "i" |
26 | "force\0" No_argument "f" | 26 | "force\0" No_argument "f" |
27 | ; | 27 | ; |
@@ -30,7 +30,8 @@ static const char mv_longopts[] = | |||
30 | #define OPT_FILEUTILS_FORCE 1 | 30 | #define OPT_FILEUTILS_FORCE 1 |
31 | #define OPT_FILEUTILS_INTERACTIVE 2 | 31 | #define OPT_FILEUTILS_INTERACTIVE 2 |
32 | 32 | ||
33 | static const char fmt[] = "cannot overwrite %sdirectory with %sdirectory"; | 33 | static const char fmt[] ALIGN1 = |
34 | "cannot overwrite %sdirectory with %sdirectory"; | ||
34 | 35 | ||
35 | int mv_main(int argc, char **argv); | 36 | int mv_main(int argc, char **argv); |
36 | int mv_main(int argc, char **argv) | 37 | int mv_main(int argc, char **argv) |
diff --git a/coreutils/od.c b/coreutils/od.c index 00de080b6..114a746fa 100644 --- a/coreutils/od.c +++ b/coreutils/od.c | |||
@@ -131,7 +131,7 @@ odoffset(int argc, char ***argvp) | |||
131 | } | 131 | } |
132 | } | 132 | } |
133 | 133 | ||
134 | static const char * const add_strings[] = { | 134 | static const char *const add_strings[] = { |
135 | "16/1 \"%3_u \" \"\\n\"", /* a */ | 135 | "16/1 \"%3_u \" \"\\n\"", /* a */ |
136 | "8/2 \" %06o \" \"\\n\"", /* B, o */ | 136 | "8/2 \" %06o \" \"\\n\"", /* B, o */ |
137 | "16/1 \"%03o \" \"\\n\"", /* b */ | 137 | "16/1 \"%03o \" \"\\n\"", /* b */ |
@@ -147,9 +147,9 @@ static const char * const add_strings[] = { | |||
147 | "4/4 \" %011o \" \"\\n\"", /* O */ | 147 | "4/4 \" %011o \" \"\\n\"", /* O */ |
148 | }; | 148 | }; |
149 | 149 | ||
150 | static const char od_opts[] = "aBbcDdeFfHhIiLlOoXxv"; | 150 | static const char od_opts[] ALIGN1 = "aBbcDdeFfHhIiLlOoXxv"; |
151 | 151 | ||
152 | static const char od_o2si[] = { | 152 | static const char od_o2si[] ALIGN1 = { |
153 | 0, 1, 2, 3, 5, | 153 | 0, 1, 2, 3, 5, |
154 | 4, 6, 6, 7, 8, | 154 | 4, 6, 6, 7, 8, |
155 | 9, 0xa, 0xb, 0xa, 0xa, | 155 | 9, 0xa, 0xb, 0xa, 0xa, |
diff --git a/coreutils/od_bloaty.c b/coreutils/od_bloaty.c index e30860544..d3c9f9a17 100644 --- a/coreutils/od_bloaty.c +++ b/coreutils/od_bloaty.c | |||
@@ -129,20 +129,20 @@ struct tspec { | |||
129 | 10 unsigned decimal | 129 | 10 unsigned decimal |
130 | 8 unsigned hexadecimal */ | 130 | 8 unsigned hexadecimal */ |
131 | 131 | ||
132 | static const uint8_t bytes_to_oct_digits[] = | 132 | static const uint8_t bytes_to_oct_digits[] ALIGN1 = |
133 | {0, 3, 6, 8, 11, 14, 16, 19, 22, 25, 27, 30, 32, 35, 38, 41, 43}; | 133 | {0, 3, 6, 8, 11, 14, 16, 19, 22, 25, 27, 30, 32, 35, 38, 41, 43}; |
134 | 134 | ||
135 | static const uint8_t bytes_to_signed_dec_digits[] = | 135 | static const uint8_t bytes_to_signed_dec_digits[] ALIGN1 = |
136 | {1, 4, 6, 8, 11, 13, 16, 18, 20, 23, 25, 28, 30, 33, 35, 37, 40}; | 136 | {1, 4, 6, 8, 11, 13, 16, 18, 20, 23, 25, 28, 30, 33, 35, 37, 40}; |
137 | 137 | ||
138 | static const uint8_t bytes_to_unsigned_dec_digits[] = | 138 | static const uint8_t bytes_to_unsigned_dec_digits[] ALIGN1 = |
139 | {0, 3, 5, 8, 10, 13, 15, 17, 20, 22, 25, 27, 29, 32, 34, 37, 39}; | 139 | {0, 3, 5, 8, 10, 13, 15, 17, 20, 22, 25, 27, 29, 32, 34, 37, 39}; |
140 | 140 | ||
141 | static const uint8_t bytes_to_hex_digits[] = | 141 | static const uint8_t bytes_to_hex_digits[] ALIGN1 = |
142 | {0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32}; | 142 | {0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32}; |
143 | 143 | ||
144 | /* Convert enum size_spec to the size of the named type. */ | 144 | /* Convert enum size_spec to the size of the named type. */ |
145 | static const signed char width_bytes[] = { | 145 | static const signed char width_bytes[] ALIGN1 = { |
146 | -1, | 146 | -1, |
147 | sizeof(char), | 147 | sizeof(char), |
148 | sizeof(short), | 148 | sizeof(short), |
@@ -212,7 +212,7 @@ static char const *const default_file_list[] = { "-", NULL }; | |||
212 | static FILE *in_stream; | 212 | static FILE *in_stream; |
213 | 213 | ||
214 | #define MAX_INTEGRAL_TYPE_SIZE sizeof(ulonglong_t) | 214 | #define MAX_INTEGRAL_TYPE_SIZE sizeof(ulonglong_t) |
215 | static unsigned char integral_type_size[MAX_INTEGRAL_TYPE_SIZE + 1] = { | 215 | static unsigned char integral_type_size[MAX_INTEGRAL_TYPE_SIZE + 1] ALIGN1 = { |
216 | [sizeof(char)] = CHAR, | 216 | [sizeof(char)] = CHAR, |
217 | #if USHRT_MAX != UCHAR_MAX | 217 | #if USHRT_MAX != UCHAR_MAX |
218 | [sizeof(short)] = SHORT, | 218 | [sizeof(short)] = SHORT, |
@@ -229,11 +229,11 @@ static unsigned char integral_type_size[MAX_INTEGRAL_TYPE_SIZE + 1] = { | |||
229 | }; | 229 | }; |
230 | 230 | ||
231 | #define MAX_FP_TYPE_SIZE sizeof(longdouble_t) | 231 | #define MAX_FP_TYPE_SIZE sizeof(longdouble_t) |
232 | static unsigned char fp_type_size[MAX_FP_TYPE_SIZE + 1] = { | 232 | static unsigned char fp_type_size[MAX_FP_TYPE_SIZE + 1] ALIGN1 = { |
233 | /* gcc seems to allow repeated indexes. Last one stays */ | 233 | /* gcc seems to allow repeated indexes. Last one stays */ |
234 | [sizeof(longdouble_t)] = FLOAT_LONG_DOUBLE, | 234 | [sizeof(longdouble_t)] = FLOAT_LONG_DOUBLE, |
235 | [sizeof(double)] = FLOAT_DOUBLE, | 235 | [sizeof(double)] = FLOAT_DOUBLE, |
236 | [sizeof(float)] = FLOAT_SINGLE, | 236 | [sizeof(float)] = FLOAT_SINGLE |
237 | }; | 237 | }; |
238 | 238 | ||
239 | 239 | ||
@@ -383,7 +383,7 @@ print_named_ascii(size_t n_bytes, const char *block, | |||
383 | const char *unused_fmt_string ATTRIBUTE_UNUSED) | 383 | const char *unused_fmt_string ATTRIBUTE_UNUSED) |
384 | { | 384 | { |
385 | /* Names for some non-printing characters. */ | 385 | /* Names for some non-printing characters. */ |
386 | static const char charname[33][3] = { | 386 | static const char charname[33][3] ALIGN1 = { |
387 | "nul", "soh", "stx", "etx", "eot", "enq", "ack", "bel", | 387 | "nul", "soh", "stx", "etx", "eot", "enq", "ack", "bel", |
388 | " bs", " ht", " nl", " vt", " ff", " cr", " so", " si", | 388 | " bs", " ht", " nl", " vt", " ff", " cr", " so", " si", |
389 | "dle", "dc1", "dc2", "dc3", "dc4", "nak", "syn", "etb", | 389 | "dle", "dc1", "dc2", "dc3", "dc4", "nak", "syn", "etb", |
@@ -560,7 +560,7 @@ decode_one_format(const char *s_orig, const char *s, const char **next, | |||
560 | case 'o': | 560 | case 'o': |
561 | case 'u': | 561 | case 'u': |
562 | case 'x': { | 562 | case 'x': { |
563 | static const char CSIL[] = "CSIL"; | 563 | static const char CSIL[] ALIGN1 = "CSIL"; |
564 | 564 | ||
565 | c = *s++; | 565 | c = *s++; |
566 | p = strchr(CSIL, *s); | 566 | p = strchr(CSIL, *s); |
@@ -596,7 +596,7 @@ decode_one_format(const char *s_orig, const char *s, const char **next, | |||
596 | size_spec = integral_type_size[size]; | 596 | size_spec = integral_type_size[size]; |
597 | 597 | ||
598 | { | 598 | { |
599 | static const char doux[] = "doux"; | 599 | static const char doux[] ALIGN1 = "doux"; |
600 | static const char doux_fmt_letter[][4] = { | 600 | static const char doux_fmt_letter[][4] = { |
601 | "lld", "llo", "llu", "llx" | 601 | "lld", "llo", "llu", "llx" |
602 | }; | 602 | }; |
@@ -653,7 +653,7 @@ decode_one_format(const char *s_orig, const char *s, const char **next, | |||
653 | } | 653 | } |
654 | 654 | ||
655 | case 'f': { | 655 | case 'f': { |
656 | static const char FDL[] = "FDL"; | 656 | static const char FDL[] ALIGN1 = "FDL"; |
657 | 657 | ||
658 | fmt = FLOATING_POINT; | 658 | fmt = FLOATING_POINT; |
659 | ++s; | 659 | ++s; |
@@ -836,7 +836,7 @@ format_address_none(off_t address ATTRIBUTE_UNUSED, char c ATTRIBUTE_UNUSED) | |||
836 | { | 836 | { |
837 | } | 837 | } |
838 | 838 | ||
839 | static char address_fmt[] = "%0n"OFF_FMT"xc"; | 839 | static char address_fmt[] ALIGN1 = "%0n"OFF_FMT"xc"; |
840 | /* Corresponds to 'x' above */ | 840 | /* Corresponds to 'x' above */ |
841 | #define address_base_char address_fmt[sizeof(address_fmt)-3] | 841 | #define address_base_char address_fmt[sizeof(address_fmt)-3] |
842 | /* Corresponds to 'n' above */ | 842 | /* Corresponds to 'n' above */ |
@@ -1233,7 +1233,7 @@ int od_main(int argc, char **argv) | |||
1233 | OPT_traditional = (1 << 18) * ENABLE_GETOPT_LONG, | 1233 | OPT_traditional = (1 << 18) * ENABLE_GETOPT_LONG, |
1234 | }; | 1234 | }; |
1235 | #if ENABLE_GETOPT_LONG | 1235 | #if ENABLE_GETOPT_LONG |
1236 | static const char od_longopts[] = | 1236 | static const char od_longopts[] ALIGN1 = |
1237 | "skip-bytes\0" Required_argument "j" | 1237 | "skip-bytes\0" Required_argument "j" |
1238 | "address-radix\0" Required_argument "A" | 1238 | "address-radix\0" Required_argument "A" |
1239 | "read-bytes\0" Required_argument "N" | 1239 | "read-bytes\0" Required_argument "N" |
@@ -1268,11 +1268,11 @@ int od_main(int argc, char **argv) | |||
1268 | argc -= optind; | 1268 | argc -= optind; |
1269 | argv += optind; | 1269 | argv += optind; |
1270 | if (opt & OPT_A) { | 1270 | if (opt & OPT_A) { |
1271 | static const char doxn[] = "doxn"; | 1271 | static const char doxn[] ALIGN1 = "doxn"; |
1272 | static const char doxn_address_base_char[] = { | 1272 | static const char doxn_address_base_char[] ALIGN1 = { |
1273 | 'u', 'o', 'x', /* '?' fourth one is not important */ | 1273 | 'u', 'o', 'x', /* '?' fourth one is not important */ |
1274 | }; | 1274 | }; |
1275 | static const uint8_t doxn_address_pad_len_char[] = { | 1275 | static const uint8_t doxn_address_pad_len_char[] ALIGN1 = { |
1276 | '7', '7', '6', /* '?' */ | 1276 | '7', '7', '6', /* '?' */ |
1277 | }; | 1277 | }; |
1278 | char *p; | 1278 | char *p; |
diff --git a/coreutils/sort.c b/coreutils/sort.c index 6371139cb..98c1bc34a 100644 --- a/coreutils/sort.c +++ b/coreutils/sort.c | |||
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | /* These are sort types */ | 25 | /* These are sort types */ |
26 | static const char OPT_STR[] = "ngMucszbrdfimS:T:o:k:t:"; | 26 | static const char OPT_STR[] ALIGN1 = "ngMucszbrdfimS:T:o:k:t:"; |
27 | enum { | 27 | enum { |
28 | FLAG_n = 1, /* Numeric sort */ | 28 | FLAG_n = 1, /* Numeric sort */ |
29 | FLAG_g = 2, /* Sort using strtod() */ | 29 | FLAG_g = 2, /* Sort using strtod() */ |
diff --git a/coreutils/stat.c b/coreutils/stat.c index 7c72127c5..0fddea2bb 100644 --- a/coreutils/stat.c +++ b/coreutils/stat.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #define OPT_DEREFERENCE (1<<2) | 21 | #define OPT_DEREFERENCE (1<<2) |
22 | #define OPT_SELINUX (1<<3) | 22 | #define OPT_SELINUX (1<<3) |
23 | 23 | ||
24 | static char buf[sizeof("YYYY-MM-DD HH:MM:SS.000000000")]; | 24 | static char buf[sizeof("YYYY-MM-DD HH:MM:SS.000000000")] ALIGN1; |
25 | 25 | ||
26 | static char const * file_type(struct stat const *st) | 26 | static char const * file_type(struct stat const *st) |
27 | { | 27 | { |
@@ -70,7 +70,7 @@ static char const *human_fstype(long f_type) | |||
70 | int i; | 70 | int i; |
71 | static const struct types { | 71 | static const struct types { |
72 | long type; | 72 | long type; |
73 | const char * const fs; | 73 | const char *const fs; |
74 | } humantypes[] = { | 74 | } humantypes[] = { |
75 | { 0xADFF, "affs" }, | 75 | { 0xADFF, "affs" }, |
76 | { 0x1Cd1, "devpts" }, | 76 | { 0x1Cd1, "devpts" }, |
@@ -118,7 +118,7 @@ static char const *human_fstype(long f_type) | |||
118 | #if ENABLE_FEATURE_STAT_FORMAT | 118 | #if ENABLE_FEATURE_STAT_FORMAT |
119 | /* print statfs info */ | 119 | /* print statfs info */ |
120 | static void print_statfs(char *pformat, const size_t buf_len, const char m, | 120 | static void print_statfs(char *pformat, const size_t buf_len, const char m, |
121 | const char * const filename, void const *data | 121 | const char *const filename, void const *data |
122 | USE_SELINUX(, security_context_t scontext)) | 122 | USE_SELINUX(, security_context_t scontext)) |
123 | { | 123 | { |
124 | struct statfs const *statfsbuf = data; | 124 | struct statfs const *statfsbuf = data; |
@@ -168,7 +168,7 @@ static void print_statfs(char *pformat, const size_t buf_len, const char m, | |||
168 | 168 | ||
169 | /* print stat info */ | 169 | /* print stat info */ |
170 | static void print_stat(char *pformat, const size_t buf_len, const char m, | 170 | static void print_stat(char *pformat, const size_t buf_len, const char m, |
171 | const char * const filename, void const *data | 171 | const char *const filename, void const *data |
172 | USE_SELINUX(, security_context_t scontext)) | 172 | USE_SELINUX(, security_context_t scontext)) |
173 | { | 173 | { |
174 | #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) | 174 | #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) |
diff --git a/coreutils/stty.c b/coreutils/stty.c index fbb72baa9..863f28d92 100644 --- a/coreutils/stty.c +++ b/coreutils/stty.c | |||
@@ -127,28 +127,28 @@ enum { | |||
127 | control, input, output, local, combination | 127 | control, input, output, local, combination |
128 | }; | 128 | }; |
129 | 129 | ||
130 | static const char evenp [] = "evenp"; | 130 | static const char evenp [] ALIGN1 = "evenp"; |
131 | static const char raw [] = "raw"; | 131 | static const char raw [] ALIGN1 = "raw"; |
132 | static const char stty_min [] = "min"; | 132 | static const char stty_min [] ALIGN1 = "min"; |
133 | static const char stty_time [] = "time"; | 133 | static const char stty_time [] ALIGN1 = "time"; |
134 | static const char stty_swtch[] = "swtch"; | 134 | static const char stty_swtch[] ALIGN1 = "swtch"; |
135 | static const char stty_eol [] = "eol"; | 135 | static const char stty_eol [] ALIGN1 = "eol"; |
136 | static const char stty_eof [] = "eof"; | 136 | static const char stty_eof [] ALIGN1 = "eof"; |
137 | static const char parity [] = "parity"; | 137 | static const char parity [] ALIGN1 = "parity"; |
138 | static const char stty_oddp [] = "oddp"; | 138 | static const char stty_oddp [] ALIGN1 = "oddp"; |
139 | static const char stty_nl [] = "nl"; | 139 | static const char stty_nl [] ALIGN1 = "nl"; |
140 | static const char stty_ek [] = "ek"; | 140 | static const char stty_ek [] ALIGN1 = "ek"; |
141 | static const char stty_sane [] = "sane"; | 141 | static const char stty_sane [] ALIGN1 = "sane"; |
142 | static const char cbreak [] = "cbreak"; | 142 | static const char cbreak [] ALIGN1 = "cbreak"; |
143 | static const char stty_pass8[] = "pass8"; | 143 | static const char stty_pass8[] ALIGN1 = "pass8"; |
144 | static const char litout [] = "litout"; | 144 | static const char litout [] ALIGN1 = "litout"; |
145 | static const char cooked [] = "cooked"; | 145 | static const char cooked [] ALIGN1 = "cooked"; |
146 | static const char decctlq [] = "decctlq"; | 146 | static const char decctlq [] ALIGN1 = "decctlq"; |
147 | static const char stty_tabs [] = "tabs"; | 147 | static const char stty_tabs [] ALIGN1 = "tabs"; |
148 | static const char stty_lcase[] = "lcase"; | 148 | static const char stty_lcase[] ALIGN1 = "lcase"; |
149 | static const char stty_LCASE[] = "LCASE"; | 149 | static const char stty_LCASE[] ALIGN1 = "LCASE"; |
150 | static const char stty_crt [] = "crt"; | 150 | static const char stty_crt [] ALIGN1 = "crt"; |
151 | static const char stty_dec [] = "dec"; | 151 | static const char stty_dec [] ALIGN1 = "dec"; |
152 | 152 | ||
153 | /* Flags for 'struct mode_info' */ | 153 | /* Flags for 'struct mode_info' */ |
154 | #define SANE_SET 1 /* Set in 'sane' mode */ | 154 | #define SANE_SET 1 /* Set in 'sane' mode */ |
@@ -158,7 +158,7 @@ static const char stty_dec [] = "dec"; | |||
158 | 158 | ||
159 | /* Each mode */ | 159 | /* Each mode */ |
160 | struct mode_info { | 160 | struct mode_info { |
161 | const char * const name; /* Name given on command line */ | 161 | const char *const name; /* Name given on command line */ |
162 | const unsigned char type; /* Which structure element to change */ | 162 | const unsigned char type; /* Which structure element to change */ |
163 | const unsigned char flags; /* Setting and display options */ | 163 | const unsigned char flags; /* Setting and display options */ |
164 | /* were using short here, but ppc32 was unhappy: */ | 164 | /* were using short here, but ppc32 was unhappy: */ |
@@ -324,7 +324,7 @@ enum { | |||
324 | 324 | ||
325 | /* Control character settings */ | 325 | /* Control character settings */ |
326 | struct control_info { | 326 | struct control_info { |
327 | const char * const name; /* Name given on command line */ | 327 | const char *const name; /* Name given on command line */ |
328 | const unsigned char saneval; /* Value to set for 'stty sane' */ | 328 | const unsigned char saneval; /* Value to set for 'stty sane' */ |
329 | const unsigned char offset; /* Offset in c_cc */ | 329 | const unsigned char offset; /* Offset in c_cc */ |
330 | }; | 330 | }; |
@@ -417,11 +417,11 @@ static const char *visible(unsigned ch) | |||
417 | 417 | ||
418 | static tcflag_t *mode_type_flag(unsigned type, const struct termios *mode) | 418 | static tcflag_t *mode_type_flag(unsigned type, const struct termios *mode) |
419 | { | 419 | { |
420 | static const unsigned char tcflag_offsets[] = { | 420 | static const unsigned char tcflag_offsets[] ALIGN1 = { |
421 | offsetof(struct termios, c_cflag), /* control */ | 421 | offsetof(struct termios, c_cflag), /* control */ |
422 | offsetof(struct termios, c_iflag), /* input */ | 422 | offsetof(struct termios, c_iflag), /* input */ |
423 | offsetof(struct termios, c_oflag), /* output */ | 423 | offsetof(struct termios, c_oflag), /* output */ |
424 | offsetof(struct termios, c_lflag), /* local */ | 424 | offsetof(struct termios, c_lflag) /* local */ |
425 | }; | 425 | }; |
426 | 426 | ||
427 | if (type <= local) { | 427 | if (type <= local) { |
@@ -430,7 +430,7 @@ static tcflag_t *mode_type_flag(unsigned type, const struct termios *mode) | |||
430 | return NULL; | 430 | return NULL; |
431 | } | 431 | } |
432 | 432 | ||
433 | static void set_speed_or_die(enum speed_setting type, const char * const arg, | 433 | static void set_speed_or_die(enum speed_setting type, const char *const arg, |
434 | struct termios * const mode) | 434 | struct termios * const mode) |
435 | { | 435 | { |
436 | speed_t baud; | 436 | speed_t baud; |
@@ -560,9 +560,9 @@ enum { | |||
560 | param_ospeed = 8 | 0x80, | 560 | param_ospeed = 8 | 0x80, |
561 | }; | 561 | }; |
562 | 562 | ||
563 | static int find_param(const char * const name) | 563 | static int find_param(const char *const name) |
564 | { | 564 | { |
565 | static const char params[] = | 565 | static const char params[] ALIGN1 = |
566 | "line\0" /* 1 */ | 566 | "line\0" /* 1 */ |
567 | "rows\0" /* 2 */ | 567 | "rows\0" /* 2 */ |
568 | "cols\0" /* 3 */ | 568 | "cols\0" /* 3 */ |
diff --git a/coreutils/tail.c b/coreutils/tail.c index 01469169a..ec21c4234 100644 --- a/coreutils/tail.c +++ b/coreutils/tail.c | |||
@@ -63,7 +63,7 @@ static ssize_t tail_read(int fd, char *buf, size_t count) | |||
63 | return r; | 63 | return r; |
64 | } | 64 | } |
65 | 65 | ||
66 | static const char header_fmt[] = "\n==> %s <==\n"; | 66 | static const char header_fmt[] ALIGN1 = "\n==> %s <==\n"; |
67 | 67 | ||
68 | static unsigned eat_num(const char *p) | 68 | static unsigned eat_num(const char *p) |
69 | { | 69 | { |
diff --git a/coreutils/tr.c b/coreutils/tr.c index 594571833..6a34e3087 100644 --- a/coreutils/tr.c +++ b/coreutils/tr.c | |||
@@ -52,7 +52,7 @@ static unsigned int expand(const char *arg, char *buffer) | |||
52 | unsigned i; /* XXX: FIXME: use unsigned char? */ | 52 | unsigned i; /* XXX: FIXME: use unsigned char? */ |
53 | unsigned char ac; | 53 | unsigned char ac; |
54 | #define CLO ":]\0" | 54 | #define CLO ":]\0" |
55 | static const char classes[] = | 55 | static const char classes[] ALIGN1 = |
56 | "alpha"CLO "alnum"CLO "digit"CLO "lower"CLO "upper"CLO "space"CLO | 56 | "alpha"CLO "alnum"CLO "digit"CLO "lower"CLO "upper"CLO "space"CLO |
57 | "blank"CLO "punct"CLO "cntrl"CLO; | 57 | "blank"CLO "punct"CLO "cntrl"CLO; |
58 | #define CLASS_invalid 0 /* we increment the retval */ | 58 | #define CLASS_invalid 0 /* we increment the retval */ |
diff --git a/coreutils/uname.c b/coreutils/uname.c index a934c15f4..8f07f1960 100644 --- a/coreutils/uname.c +++ b/coreutils/uname.c | |||
@@ -38,8 +38,8 @@ typedef struct { | |||
38 | char processor[8]; /* for "unknown" */ | 38 | char processor[8]; /* for "unknown" */ |
39 | } uname_info_t; | 39 | } uname_info_t; |
40 | 40 | ||
41 | static const char options[] = "snrvmpa"; | 41 | static const char options[] ALIGN1 = "snrvmpa"; |
42 | static const unsigned short int utsname_offset[] = { | 42 | static const unsigned short utsname_offset[] ALIGN2 = { |
43 | offsetof(uname_info_t,name.sysname), | 43 | offsetof(uname_info_t,name.sysname), |
44 | offsetof(uname_info_t,name.nodename), | 44 | offsetof(uname_info_t,name.nodename), |
45 | offsetof(uname_info_t,name.release), | 45 | offsetof(uname_info_t,name.release), |
diff --git a/coreutils/uniq.c b/coreutils/uniq.c index adc196b97..a7caef991 100644 --- a/coreutils/uniq.c +++ b/coreutils/uniq.c | |||
@@ -12,7 +12,7 @@ | |||
12 | 12 | ||
13 | #include "libbb.h" | 13 | #include "libbb.h" |
14 | 14 | ||
15 | static const char uniq_opts[] = "cdu" "f:s:" "cdu\0\1\2\4"; | 15 | static const char uniq_opts[] ALIGN1 = "cdu" "f:s:" "cdu\0\1\2\4"; |
16 | 16 | ||
17 | static FILE *xgetoptfile_uniq_s(char **argv, int read0write2) | 17 | static FILE *xgetoptfile_uniq_s(char **argv, int read0write2) |
18 | { | 18 | { |
diff --git a/debianutils/run_parts.c b/debianutils/run_parts.c index 8a1f38a1d..5066742cf 100644 --- a/debianutils/run_parts.c +++ b/debianutils/run_parts.c | |||
@@ -35,7 +35,7 @@ | |||
35 | #include "libbb.h" | 35 | #include "libbb.h" |
36 | 36 | ||
37 | #if ENABLE_FEATURE_RUN_PARTS_LONG_OPTIONS | 37 | #if ENABLE_FEATURE_RUN_PARTS_LONG_OPTIONS |
38 | static const char runparts_longopts[] = | 38 | static const char runparts_longopts[] ALIGN1 = |
39 | "arg\0" Required_argument "a" | 39 | "arg\0" Required_argument "a" |
40 | "umask\0" Required_argument "u" | 40 | "umask\0" Required_argument "u" |
41 | "test\0" No_argument "t" | 41 | "test\0" No_argument "t" |
diff --git a/debianutils/start_stop_daemon.c b/debianutils/start_stop_daemon.c index cf792709c..f24168e33 100644 --- a/debianutils/start_stop_daemon.c +++ b/debianutils/start_stop_daemon.c | |||
@@ -192,7 +192,7 @@ static int do_stop(void) | |||
192 | } | 192 | } |
193 | 193 | ||
194 | #if ENABLE_FEATURE_START_STOP_DAEMON_LONG_OPTIONS | 194 | #if ENABLE_FEATURE_START_STOP_DAEMON_LONG_OPTIONS |
195 | static const char start_stop_daemon_longopts[] = | 195 | static const char start_stop_daemon_longopts[] ALIGN1 = |
196 | "stop\0" No_argument "K" | 196 | "stop\0" No_argument "K" |
197 | "start\0" No_argument "S" | 197 | "start\0" No_argument "S" |
198 | "background\0" No_argument "b" | 198 | "background\0" No_argument "b" |
diff --git a/e2fsprogs/chattr.c b/e2fsprogs/chattr.c index 0ac03738c..35424f842 100644 --- a/e2fsprogs/chattr.c +++ b/e2fsprogs/chattr.c | |||
@@ -38,7 +38,7 @@ struct globals { | |||
38 | static unsigned long get_flag(char c) | 38 | static unsigned long get_flag(char c) |
39 | { | 39 | { |
40 | /* Two separate vectors take less space than vector of structs */ | 40 | /* Two separate vectors take less space than vector of structs */ |
41 | static const char flags_letter[] = "ASDacdijsutT"; | 41 | static const char flags_letter[] ALIGN1 = "ASDacdijsutT"; |
42 | static const unsigned long flags_val[] = { | 42 | static const unsigned long flags_val[] = { |
43 | /* A */ EXT2_NOATIME_FL, | 43 | /* A */ EXT2_NOATIME_FL, |
44 | /* S */ EXT2_SYNC_FL, | 44 | /* S */ EXT2_SYNC_FL, |
diff --git a/e2fsprogs/fsck.c b/e2fsprogs/fsck.c index eb1fa84c8..dfcbf67dd 100644 --- a/e2fsprogs/fsck.c +++ b/e2fsprogs/fsck.c | |||
@@ -79,7 +79,7 @@ struct fsck_instance { | |||
79 | char *base_device; /* /dev/hda for /dev/hdaN etc */ | 79 | char *base_device; /* /dev/hda for /dev/hdaN etc */ |
80 | }; | 80 | }; |
81 | 81 | ||
82 | static const char ignored_types[] = | 82 | static const char ignored_types[] ALIGN1 = |
83 | "ignore\0" | 83 | "ignore\0" |
84 | "iso9660\0" | 84 | "iso9660\0" |
85 | "nfs\0" | 85 | "nfs\0" |
@@ -90,7 +90,7 @@ static const char ignored_types[] = | |||
90 | "devpts\0"; | 90 | "devpts\0"; |
91 | 91 | ||
92 | #if 0 | 92 | #if 0 |
93 | static const char really_wanted[] = | 93 | static const char really_wanted[] ALIGN1 = |
94 | "minix\0" | 94 | "minix\0" |
95 | "ext2\0" | 95 | "ext2\0" |
96 | "ext3\0" | 96 | "ext3\0" |
diff --git a/e2fsprogs/old_e2fsprogs/blkid/probe.c b/e2fsprogs/old_e2fsprogs/blkid/probe.c index 8c6e2aa33..453b4d04a 100644 --- a/e2fsprogs/old_e2fsprogs/blkid/probe.c +++ b/e2fsprogs/old_e2fsprogs/blkid/probe.c | |||
@@ -379,7 +379,7 @@ static int probe_udf(int fd, blkid_cache cache __BLKID_ATTR((unused)), | |||
379 | { | 379 | { |
380 | int j, bs; | 380 | int j, bs; |
381 | struct iso_volume_descriptor isosb; | 381 | struct iso_volume_descriptor isosb; |
382 | const char * const * m; | 382 | const char *const *m; |
383 | 383 | ||
384 | /* determine the block size by scanning in 2K increments | 384 | /* determine the block size by scanning in 2K increments |
385 | (block sizes larger than 2K will be null padded) */ | 385 | (block sizes larger than 2K will be null padded) */ |
diff --git a/e2fsprogs/old_e2fsprogs/e2fsck.c b/e2fsprogs/old_e2fsprogs/e2fsck.c index efb870076..3d5b4f4fb 100644 --- a/e2fsprogs/old_e2fsprogs/e2fsck.c +++ b/e2fsprogs/old_e2fsprogs/e2fsck.c | |||
@@ -2168,7 +2168,7 @@ static int e2fsck_run_ext3_journal(e2fsck_t ctx) | |||
2168 | * This function will move the journal inode from a visible file in | 2168 | * This function will move the journal inode from a visible file in |
2169 | * the filesystem directory hierarchy to the reserved inode if necessary. | 2169 | * the filesystem directory hierarchy to the reserved inode if necessary. |
2170 | */ | 2170 | */ |
2171 | static const char * const journal_names[] = { | 2171 | static const char *const journal_names[] = { |
2172 | ".journal", "journal", ".journal.dat", "journal.dat", 0 }; | 2172 | ".journal", "journal", ".journal.dat", "journal.dat", 0 }; |
2173 | 2173 | ||
2174 | static void e2fsck_move_ext3_journal(e2fsck_t ctx) | 2174 | static void e2fsck_move_ext3_journal(e2fsck_t ctx) |
@@ -2179,7 +2179,7 @@ static void e2fsck_move_ext3_journal(e2fsck_t ctx) | |||
2179 | ext2_filsys fs = ctx->fs; | 2179 | ext2_filsys fs = ctx->fs; |
2180 | ext2_ino_t ino; | 2180 | ext2_ino_t ino; |
2181 | errcode_t retval; | 2181 | errcode_t retval; |
2182 | const char * const * cpp; | 2182 | const char *const * cpp; |
2183 | int group, mount_flags; | 2183 | int group, mount_flags; |
2184 | 2184 | ||
2185 | clear_problem_context(&pctx); | 2185 | clear_problem_context(&pctx); |
@@ -2372,7 +2372,7 @@ err_out: | |||
2372 | * abbreviation of the form '@<i>' is expanded by looking up the index | 2372 | * abbreviation of the form '@<i>' is expanded by looking up the index |
2373 | * letter <i> in the table below. | 2373 | * letter <i> in the table below. |
2374 | */ | 2374 | */ |
2375 | static const char * const abbrevs[] = { | 2375 | static const char *const abbrevs[] = { |
2376 | N_("aextended attribute"), | 2376 | N_("aextended attribute"), |
2377 | N_("Aerror allocating"), | 2377 | N_("Aerror allocating"), |
2378 | N_("bblock"), | 2378 | N_("bblock"), |
@@ -2410,7 +2410,7 @@ static const char * const abbrevs[] = { | |||
2410 | * Give more user friendly names to the "special" inodes. | 2410 | * Give more user friendly names to the "special" inodes. |
2411 | */ | 2411 | */ |
2412 | #define num_special_inodes 11 | 2412 | #define num_special_inodes 11 |
2413 | static const char * const special_inode_name[] = | 2413 | static const char *const special_inode_name[] = |
2414 | { | 2414 | { |
2415 | N_("<The NULL inode>"), /* 0 */ | 2415 | N_("<The NULL inode>"), /* 0 */ |
2416 | N_("<The bad blocks inode>"), /* 1 */ | 2416 | N_("<The bad blocks inode>"), /* 1 */ |
@@ -2485,7 +2485,7 @@ static void expand_at_expression(e2fsck_t ctx, char ch, | |||
2485 | struct problem_context *pctx, | 2485 | struct problem_context *pctx, |
2486 | int *first) | 2486 | int *first) |
2487 | { | 2487 | { |
2488 | const char * const *cpp; | 2488 | const char *const *cpp; |
2489 | const char *str; | 2489 | const char *str; |
2490 | 2490 | ||
2491 | /* Search for the abbreviation */ | 2491 | /* Search for the abbreviation */ |
@@ -8178,7 +8178,7 @@ struct latch_descr { | |||
8178 | * These are the prompts which are used to ask the user if they want | 8178 | * These are the prompts which are used to ask the user if they want |
8179 | * to fix a problem. | 8179 | * to fix a problem. |
8180 | */ | 8180 | */ |
8181 | static const char * const prompt[] = { | 8181 | static const char *const prompt[] = { |
8182 | N_("(no prompt)"), /* 0 */ | 8182 | N_("(no prompt)"), /* 0 */ |
8183 | N_("Fix"), /* 1 */ | 8183 | N_("Fix"), /* 1 */ |
8184 | N_("Clear"), /* 2 */ | 8184 | N_("Clear"), /* 2 */ |
@@ -8206,7 +8206,7 @@ static const char * const prompt[] = { | |||
8206 | * These messages are printed when we are preen mode and we will be | 8206 | * These messages are printed when we are preen mode and we will be |
8207 | * automatically fixing the problem. | 8207 | * automatically fixing the problem. |
8208 | */ | 8208 | */ |
8209 | static const char * const preen_msg[] = { | 8209 | static const char *const preen_msg[] = { |
8210 | N_("(NONE)"), /* 0 */ | 8210 | N_("(NONE)"), /* 0 */ |
8211 | N_("FIXED"), /* 1 */ | 8211 | N_("FIXED"), /* 1 */ |
8212 | N_("CLEARED"), /* 2 */ | 8212 | N_("CLEARED"), /* 2 */ |
diff --git a/e2fsprogs/old_e2fsprogs/e2p/ostype.c b/e2fsprogs/old_e2fsprogs/e2p/ostype.c index 0e111d408..1abe2ba91 100644 --- a/e2fsprogs/old_e2fsprogs/e2p/ostype.c +++ b/e2fsprogs/old_e2fsprogs/e2p/ostype.c | |||
@@ -12,7 +12,7 @@ | |||
12 | #include <string.h> | 12 | #include <string.h> |
13 | #include <stdlib.h> | 13 | #include <stdlib.h> |
14 | 14 | ||
15 | static const char * const os_tab[] = | 15 | static const char *const os_tab[] = |
16 | { "Linux", | 16 | { "Linux", |
17 | "Hurd", | 17 | "Hurd", |
18 | "Masix", | 18 | "Masix", |
@@ -42,7 +42,7 @@ char *e2p_os2string(int os_type) | |||
42 | */ | 42 | */ |
43 | int e2p_string2os(char *str) | 43 | int e2p_string2os(char *str) |
44 | { | 44 | { |
45 | const char * const *cpp; | 45 | const char *const *cpp; |
46 | int i = 0; | 46 | int i = 0; |
47 | 47 | ||
48 | for (cpp = os_tab; *cpp; cpp++, i++) { | 48 | for (cpp = os_tab; *cpp; cpp++, i++) { |
diff --git a/e2fsprogs/old_e2fsprogs/fsck.c b/e2fsprogs/old_e2fsprogs/fsck.c index cf398079c..261783726 100644 --- a/e2fsprogs/old_e2fsprogs/fsck.c +++ b/e2fsprogs/old_e2fsprogs/fsck.c | |||
@@ -115,7 +115,7 @@ struct fsck_instance { | |||
115 | * Required for the uber-silly devfs /dev/ide/host1/bus2/target3/lun3 | 115 | * Required for the uber-silly devfs /dev/ide/host1/bus2/target3/lun3 |
116 | * pathames. | 116 | * pathames. |
117 | */ | 117 | */ |
118 | static const char * const devfs_hier[] = { | 118 | static const char *const devfs_hier[] = { |
119 | "host", "bus", "target", "lun", 0 | 119 | "host", "bus", "target", "lun", 0 |
120 | }; | 120 | }; |
121 | #endif | 121 | #endif |
@@ -124,7 +124,7 @@ static char *base_device(const char *device) | |||
124 | { | 124 | { |
125 | char *str, *cp; | 125 | char *str, *cp; |
126 | #ifdef CONFIG_FEATURE_DEVFS | 126 | #ifdef CONFIG_FEATURE_DEVFS |
127 | const char * const *hier; | 127 | const char *const *hier; |
128 | const char *disk; | 128 | const char *disk; |
129 | int len; | 129 | int len; |
130 | #endif | 130 | #endif |
@@ -226,7 +226,7 @@ errout: | |||
226 | } | 226 | } |
227 | 227 | ||
228 | 228 | ||
229 | static const char * const ignored_types[] = { | 229 | static const char *const ignored_types[] = { |
230 | "ignore", | 230 | "ignore", |
231 | "iso9660", | 231 | "iso9660", |
232 | "nfs", | 232 | "nfs", |
@@ -238,7 +238,7 @@ static const char * const ignored_types[] = { | |||
238 | NULL | 238 | NULL |
239 | }; | 239 | }; |
240 | 240 | ||
241 | static const char * const really_wanted[] = { | 241 | static const char *const really_wanted[] = { |
242 | "minix", | 242 | "minix", |
243 | "ext2", | 243 | "ext2", |
244 | "ext3", | 244 | "ext3", |
diff --git a/editors/awk.c b/editors/awk.c index 752c73e7e..4ec3d4652 100644 --- a/editors/awk.c +++ b/editors/awk.c | |||
@@ -263,7 +263,7 @@ enum { | |||
263 | 263 | ||
264 | #define OC_B OC_BUILTIN | 264 | #define OC_B OC_BUILTIN |
265 | 265 | ||
266 | static const char tokenlist[] = | 266 | static const char tokenlist[] ALIGN1 = |
267 | "\1(" NTC | 267 | "\1(" NTC |
268 | "\1)" NTC | 268 | "\1)" NTC |
269 | "\1/" NTC /* REGEXP */ | 269 | "\1/" NTC /* REGEXP */ |
@@ -373,7 +373,7 @@ enum { | |||
373 | ENVIRON, F0, NUM_INTERNAL_VARS | 373 | ENVIRON, F0, NUM_INTERNAL_VARS |
374 | }; | 374 | }; |
375 | 375 | ||
376 | static const char vNames[] = | 376 | static const char vNames[] ALIGN1 = |
377 | "CONVFMT\0" "OFMT\0" "FS\0*" "OFS\0" | 377 | "CONVFMT\0" "OFMT\0" "FS\0*" "OFS\0" |
378 | "ORS\0" "RS\0*" "RT\0" "FILENAME\0" | 378 | "ORS\0" "RS\0*" "RT\0" "FILENAME\0" |
379 | "SUBSEP\0" "ARGIND\0" "ARGC\0" "ARGV\0" | 379 | "SUBSEP\0" "ARGIND\0" "ARGC\0" "ARGV\0" |
@@ -381,16 +381,15 @@ static const char vNames[] = | |||
381 | "NR\0" "NF\0*" "IGNORECASE\0*" | 381 | "NR\0" "NF\0*" "IGNORECASE\0*" |
382 | "ENVIRON\0" "$\0*" "\0"; | 382 | "ENVIRON\0" "$\0*" "\0"; |
383 | 383 | ||
384 | static const char vValues[] = | 384 | static const char vValues[] ALIGN1 = |
385 | "%.6g\0" "%.6g\0" " \0" " \0" | 385 | "%.6g\0" "%.6g\0" " \0" " \0" |
386 | "\n\0" "\n\0" "\0" "\0" | 386 | "\n\0" "\n\0" "\0" "\0" |
387 | "\034\0" | 387 | "\034\0" |
388 | "\377"; | 388 | "\377"; |
389 | 389 | ||
390 | /* hash size may grow to these values */ | 390 | /* hash size may grow to these values */ |
391 | #define FIRST_PRIME 61; | 391 | #define FIRST_PRIME 61 |
392 | static const unsigned PRIMES[] = { 251, 1021, 4093, 16381, 65521 }; | 392 | static const uint16_t PRIMES[] ALIGN2 = { 251, 1021, 4093, 16381, 65521 }; |
393 | |||
394 | 393 | ||
395 | 394 | ||
396 | /* Globals. Split in two parts so that first one is addressed | 395 | /* Globals. Split in two parts so that first one is addressed |
@@ -504,17 +503,17 @@ static int awk_exit(int) ATTRIBUTE_NORETURN; | |||
504 | 503 | ||
505 | /* ---- error handling ---- */ | 504 | /* ---- error handling ---- */ |
506 | 505 | ||
507 | static const char EMSG_INTERNAL_ERROR[] = "Internal error"; | 506 | static const char EMSG_INTERNAL_ERROR[] ALIGN1 = "Internal error"; |
508 | static const char EMSG_UNEXP_EOS[] = "Unexpected end of string"; | 507 | static const char EMSG_UNEXP_EOS[] ALIGN1 = "Unexpected end of string"; |
509 | static const char EMSG_UNEXP_TOKEN[] = "Unexpected token"; | 508 | static const char EMSG_UNEXP_TOKEN[] ALIGN1 = "Unexpected token"; |
510 | static const char EMSG_DIV_BY_ZERO[] = "Division by zero"; | 509 | static const char EMSG_DIV_BY_ZERO[] ALIGN1 = "Division by zero"; |
511 | static const char EMSG_INV_FMT[] = "Invalid format specifier"; | 510 | static const char EMSG_INV_FMT[] ALIGN1 = "Invalid format specifier"; |
512 | static const char EMSG_TOO_FEW_ARGS[] = "Too few arguments for builtin"; | 511 | static const char EMSG_TOO_FEW_ARGS[] ALIGN1 = "Too few arguments for builtin"; |
513 | static const char EMSG_NOT_ARRAY[] = "Not an array"; | 512 | static const char EMSG_NOT_ARRAY[] ALIGN1 = "Not an array"; |
514 | static const char EMSG_POSSIBLE_ERROR[] = "Possible syntax error"; | 513 | static const char EMSG_POSSIBLE_ERROR[] ALIGN1 = "Possible syntax error"; |
515 | static const char EMSG_UNDEF_FUNC[] = "Call to undefined function"; | 514 | static const char EMSG_UNDEF_FUNC[] ALIGN1 = "Call to undefined function"; |
516 | #if !ENABLE_FEATURE_AWK_MATH | 515 | #if !ENABLE_FEATURE_AWK_MATH |
517 | static const char EMSG_NO_MATH[] = "Math support is not compiled in"; | 516 | static const char EMSG_NO_MATH[] ALIGN1 = "Math support is not compiled in"; |
518 | #endif | 517 | #endif |
519 | 518 | ||
520 | static void zero_out_var(var * vp) | 519 | static void zero_out_var(var * vp) |
@@ -522,8 +521,8 @@ static void zero_out_var(var * vp) | |||
522 | memset(vp, 0, sizeof(*vp)); | 521 | memset(vp, 0, sizeof(*vp)); |
523 | } | 522 | } |
524 | 523 | ||
525 | static void syntax_error(const char * const message) ATTRIBUTE_NORETURN; | 524 | static void syntax_error(const char *const message) ATTRIBUTE_NORETURN; |
526 | static void syntax_error(const char * const message) | 525 | static void syntax_error(const char *const message) |
527 | { | 526 | { |
528 | bb_error_msg_and_die("%s:%i: %s", g_progname, g_lineno, message); | 527 | bb_error_msg_and_die("%s:%i: %s", g_progname, g_lineno, message); |
529 | } | 528 | } |
@@ -825,7 +824,7 @@ static var *copyvar(var *dest, const var *src) | |||
825 | 824 | ||
826 | static var *incvar(var *v) | 825 | static var *incvar(var *v) |
827 | { | 826 | { |
828 | return setvar_i(v, getvar_i(v)+1.); | 827 | return setvar_i(v, getvar_i(v) + 1.); |
829 | } | 828 | } |
830 | 829 | ||
831 | /* return true if v is number or numeric string */ | 830 | /* return true if v is number or numeric string */ |
diff --git a/editors/cmp.c b/editors/cmp.c index da431f39b..ffdfb9103 100644 --- a/editors/cmp.c +++ b/editors/cmp.c | |||
@@ -33,12 +33,12 @@ static FILE *cmp_xfopen_input(const char *filename) | |||
33 | xfunc_die(); /* We already output an error message. */ | 33 | xfunc_die(); /* We already output an error message. */ |
34 | } | 34 | } |
35 | 35 | ||
36 | static const char fmt_eof[] = "cmp: EOF on %s\n"; | 36 | static const char fmt_eof[] ALIGN1 = "cmp: EOF on %s\n"; |
37 | static const char fmt_differ[] = "%s %s differ: char %"OFF_FMT"d, line %d\n"; | 37 | static const char fmt_differ[] ALIGN1 = "%s %s differ: char %"OFF_FMT"d, line %d\n"; |
38 | // This fmt_l_opt uses gnu-isms. SUSv3 would be "%.0s%.0s%"OFF_FMT"d %o %o\n" | 38 | // This fmt_l_opt uses gnu-isms. SUSv3 would be "%.0s%.0s%"OFF_FMT"d %o %o\n" |
39 | static const char fmt_l_opt[] = "%.0s%.0s%"OFF_FMT"d %3o %3o\n"; | 39 | static const char fmt_l_opt[] ALIGN1 = "%.0s%.0s%"OFF_FMT"d %3o %3o\n"; |
40 | 40 | ||
41 | static const char opt_chars[] = "sl"; | 41 | static const char opt_chars[] ALIGN1 = "sl"; |
42 | #define CMP_OPT_s (1<<0) | 42 | #define CMP_OPT_s (1<<0) |
43 | #define CMP_OPT_l (1<<1) | 43 | #define CMP_OPT_l (1<<1) |
44 | 44 | ||
diff --git a/editors/diff.c b/editors/diff.c index 88f8b22db..41808b1ac 100644 --- a/editors/diff.c +++ b/editors/diff.c | |||
@@ -166,7 +166,7 @@ static void print_only(const char *path, size_t dirlen, const char *entry) | |||
166 | 166 | ||
167 | static void print_status(int val, char *path1, char *path2, char *entry) | 167 | static void print_status(int val, char *path1, char *path2, char *entry) |
168 | { | 168 | { |
169 | const char * const _entry = entry ? entry : ""; | 169 | const char *const _entry = entry ? entry : ""; |
170 | char * const _path1 = entry ? concat_path_file(path1, _entry) : path1; | 170 | char * const _path1 = entry ? concat_path_file(path1, _entry) : path1; |
171 | char * const _path2 = entry ? concat_path_file(path2, _entry) : path2; | 171 | char * const _path2 = entry ? concat_path_file(path2, _entry) : path2; |
172 | 172 | ||
diff --git a/editors/sed.c b/editors/sed.c index 4647079aa..01ef93c6c 100644 --- a/editors/sed.c +++ b/editors/sed.c | |||
@@ -89,7 +89,7 @@ typedef struct sed_cmd_s { | |||
89 | char cmd; /* The command char: abcdDgGhHilnNpPqrstwxy:={} */ | 89 | char cmd; /* The command char: abcdDgGhHilnNpPqrstwxy:={} */ |
90 | } sed_cmd_t; | 90 | } sed_cmd_t; |
91 | 91 | ||
92 | static const char semicolon_whitespace[] = "; \n\r\t\v"; | 92 | static const char semicolon_whitespace[] ALIGN1 = "; \n\r\t\v"; |
93 | 93 | ||
94 | struct globals { | 94 | struct globals { |
95 | /* options */ | 95 | /* options */ |
diff --git a/editors/vi.c b/editors/vi.c index c4f3a8393..74566499c 100644 --- a/editors/vi.c +++ b/editors/vi.c | |||
@@ -62,18 +62,18 @@ enum { | |||
62 | 62 | ||
63 | /* vt102 typical ESC sequence */ | 63 | /* vt102 typical ESC sequence */ |
64 | /* terminal standout start/normal ESC sequence */ | 64 | /* terminal standout start/normal ESC sequence */ |
65 | static const char SOs[] = "\033[7m"; | 65 | static const char SOs[] ALIGN1 = "\033[7m"; |
66 | static const char SOn[] = "\033[0m"; | 66 | static const char SOn[] ALIGN1 = "\033[0m"; |
67 | /* terminal bell sequence */ | 67 | /* terminal bell sequence */ |
68 | static const char bell[] = "\007"; | 68 | static const char bell[] ALIGN1 = "\007"; |
69 | /* Clear-end-of-line and Clear-end-of-screen ESC sequence */ | 69 | /* Clear-end-of-line and Clear-end-of-screen ESC sequence */ |
70 | static const char Ceol[] = "\033[0K"; | 70 | static const char Ceol[] ALIGN1 = "\033[0K"; |
71 | static const char Ceos [] = "\033[0J"; | 71 | static const char Ceos[] ALIGN1 = "\033[0J"; |
72 | /* Cursor motion arbitrary destination ESC sequence */ | 72 | /* Cursor motion arbitrary destination ESC sequence */ |
73 | static const char CMrc[] = "\033[%d;%dH"; | 73 | static const char CMrc[] ALIGN1 = "\033[%d;%dH"; |
74 | /* Cursor motion up and down ESC sequence */ | 74 | /* Cursor motion up and down ESC sequence */ |
75 | static const char CMup[] = "\033[A"; | 75 | static const char CMup[] ALIGN1 = "\033[A"; |
76 | static const char CMdown[] = "\n"; | 76 | static const char CMdown[] ALIGN1 = "\n"; |
77 | 77 | ||
78 | 78 | ||
79 | enum { | 79 | enum { |
@@ -2663,7 +2663,7 @@ static void ni(const char * s) // display messages | |||
2663 | static int format_edit_status(void) // show file status on status line | 2663 | static int format_edit_status(void) // show file status on status line |
2664 | { | 2664 | { |
2665 | static int tot; | 2665 | static int tot; |
2666 | static const char cmd_mode_indicator[] = "-IR-"; | 2666 | static const char cmd_mode_indicator[] ALIGN1 = "-IR-"; |
2667 | int cur, percent, ret, trunc_at; | 2667 | int cur, percent, ret, trunc_at; |
2668 | 2668 | ||
2669 | // file_modified is now a counter rather than a flag. this | 2669 | // file_modified is now a counter rather than a flag. this |
diff --git a/findutils/find.c b/findutils/find.c index 47cba7c88..ea789a01c 100644 --- a/findutils/find.c +++ b/findutils/find.c | |||
@@ -470,7 +470,7 @@ static action*** parse_params(char **argv) | |||
470 | USE_FEATURE_FIND_CONTEXT(PARM_context ,) | 470 | USE_FEATURE_FIND_CONTEXT(PARM_context ,) |
471 | }; | 471 | }; |
472 | 472 | ||
473 | static const char params[] = | 473 | static const char params[] ALIGN1 = |
474 | "-a\0" | 474 | "-a\0" |
475 | "-o\0" | 475 | "-o\0" |
476 | USE_FEATURE_FIND_NOT( "!\0" ) | 476 | USE_FEATURE_FIND_NOT( "!\0" ) |
@@ -794,7 +794,7 @@ static action*** parse_params(char **argv) | |||
794 | int find_main(int argc, char **argv); | 794 | int find_main(int argc, char **argv); |
795 | int find_main(int argc, char **argv) | 795 | int find_main(int argc, char **argv) |
796 | { | 796 | { |
797 | static const char options[] = | 797 | static const char options[] ALIGN1 = |
798 | "-follow\0" | 798 | "-follow\0" |
799 | USE_FEATURE_FIND_XDEV( "-xdev\0" ) | 799 | USE_FEATURE_FIND_XDEV( "-xdev\0" ) |
800 | USE_FEATURE_FIND_MAXDEPTH("-maxdepth\0") | 800 | USE_FEATURE_FIND_MAXDEPTH("-maxdepth\0") |
diff --git a/include/platform.h b/include/platform.h index dcdb5c8f7..ff23ca18c 100644 --- a/include/platform.h +++ b/include/platform.h | |||
@@ -169,7 +169,7 @@ __extension__ typedef unsigned long long __u64; | |||
169 | # error "Sorry, this libc version is not supported :(" | 169 | # error "Sorry, this libc version is not supported :(" |
170 | #endif | 170 | #endif |
171 | 171 | ||
172 | // Don't perpetuate e2fsck crap into the headers. Clean up e2fsck instead. | 172 | /* Don't perpetuate e2fsck crap into the headers. Clean up e2fsck instead. */ |
173 | 173 | ||
174 | #if defined __GLIBC__ || defined __UCLIBC__ \ | 174 | #if defined __GLIBC__ || defined __UCLIBC__ \ |
175 | || defined __dietlibc__ || defined _NEWLIB_VERSION | 175 | || defined __dietlibc__ || defined _NEWLIB_VERSION |
@@ -210,6 +210,16 @@ typedef unsigned smalluint; | |||
210 | #include <stdbool.h> | 210 | #include <stdbool.h> |
211 | #endif | 211 | #endif |
212 | 212 | ||
213 | /* Try to defeat gcc's alignment of "char message[]"-like data */ | ||
214 | #if 1 /* if needed: !defined(arch1) && !defined(arch2) */ | ||
215 | #define ALIGN1 __attribute__((aligned(1))) | ||
216 | #define ALIGN2 __attribute__((aligned(2))) | ||
217 | #else | ||
218 | /* Arches which MUST have 2 or 4 byte alignment for everything are here */ | ||
219 | #define ALIGN1 | ||
220 | #define ALIGN2 | ||
221 | #endif | ||
222 | |||
213 | 223 | ||
214 | /* uclibc does not implement daemon() for no-mmu systems. | 224 | /* uclibc does not implement daemon() for no-mmu systems. |
215 | * For 0.9.29 and svn, __ARCH_USE_MMU__ indicates no-mmu reliably. | 225 | * For 0.9.29 and svn, __ARCH_USE_MMU__ indicates no-mmu reliably. |
@@ -289,7 +299,7 @@ static ALWAYS_INLINE char* strchrnul(const char *s, char c) | |||
289 | 299 | ||
290 | #if defined(__linux__) | 300 | #if defined(__linux__) |
291 | #include <sys/mount.h> | 301 | #include <sys/mount.h> |
292 | // Make sure we have all the new mount flags we actually try to use. | 302 | /* Make sure we have all the new mount flags we actually try to use. */ |
293 | #ifndef MS_BIND | 303 | #ifndef MS_BIND |
294 | #define MS_BIND (1<<12) | 304 | #define MS_BIND (1<<12) |
295 | #endif | 305 | #endif |
@@ -303,7 +313,7 @@ static ALWAYS_INLINE char* strchrnul(const char *s, char c) | |||
303 | #define MS_SILENT (1<<15) | 313 | #define MS_SILENT (1<<15) |
304 | #endif | 314 | #endif |
305 | 315 | ||
306 | // The shared subtree stuff, which went in around 2.6.15 | 316 | /* The shared subtree stuff, which went in around 2.6.15. */ |
307 | #ifndef MS_UNBINDABLE | 317 | #ifndef MS_UNBINDABLE |
308 | #define MS_UNBINDABLE (1<<17) | 318 | #define MS_UNBINDABLE (1<<17) |
309 | #endif | 319 | #endif |
diff --git a/init/init.c b/init/init.c index 5c7efe210..a196ab3ed 100644 --- a/init/init.c +++ b/init/init.c | |||
@@ -106,7 +106,7 @@ enum { | |||
106 | #endif | 106 | #endif |
107 | }; | 107 | }; |
108 | 108 | ||
109 | static const char * const environment[] = { | 109 | static const char *const environment[] = { |
110 | "HOME=/", | 110 | "HOME=/", |
111 | bb_PATH_root_path, | 111 | bb_PATH_root_path, |
112 | "SHELL=/bin/sh", | 112 | "SHELL=/bin/sh", |
@@ -457,7 +457,7 @@ static pid_t run(const struct init_action *a) | |||
457 | 457 | ||
458 | #if !defined(__UCLIBC__) || defined(__ARCH_HAS_MMU__) | 458 | #if !defined(__UCLIBC__) || defined(__ARCH_HAS_MMU__) |
459 | if (a->action & ASKFIRST) { | 459 | if (a->action & ASKFIRST) { |
460 | static const char press_enter[] = | 460 | static const char press_enter[] ALIGN1 = |
461 | #ifdef CUSTOMIZED_BANNER | 461 | #ifdef CUSTOMIZED_BANNER |
462 | #include CUSTOMIZED_BANNER | 462 | #include CUSTOMIZED_BANNER |
463 | #endif | 463 | #endif |
@@ -923,7 +923,7 @@ int init_main(int argc, char **argv) | |||
923 | chdir("/"); | 923 | chdir("/"); |
924 | setsid(); | 924 | setsid(); |
925 | { | 925 | { |
926 | const char * const *e; | 926 | const char *const *e; |
927 | /* Make sure environs is set to something sane */ | 927 | /* Make sure environs is set to something sane */ |
928 | for (e = environment; *e; e++) | 928 | for (e = environment; *e; e++) |
929 | putenv((char *) *e); | 929 | putenv((char *) *e); |
diff --git a/libbb/compare_string_array.c b/libbb/compare_string_array.c index e873d7cc3..731d3d8c1 100644 --- a/libbb/compare_string_array.c +++ b/libbb/compare_string_array.c | |||
@@ -7,7 +7,7 @@ | |||
7 | 7 | ||
8 | /* returns the array index of the string */ | 8 | /* returns the array index of the string */ |
9 | /* (index of first match is returned, or -1) */ | 9 | /* (index of first match is returned, or -1) */ |
10 | int index_in_str_array(const char * const string_array[], const char *key) | 10 | int index_in_str_array(const char *const string_array[], const char *key) |
11 | { | 11 | { |
12 | int i; | 12 | int i; |
13 | 13 | ||
@@ -36,7 +36,7 @@ int index_in_strings(const char *strings, const char *key) | |||
36 | /* returns the array index of the string, even if it matches only a beginning */ | 36 | /* returns the array index of the string, even if it matches only a beginning */ |
37 | /* (index of first match is returned, or -1) */ | 37 | /* (index of first match is returned, or -1) */ |
38 | #ifdef UNUSED | 38 | #ifdef UNUSED |
39 | int index_in_substr_array(const char * const string_array[], const char *key) | 39 | int index_in_substr_array(const char *const string_array[], const char *key) |
40 | { | 40 | { |
41 | int i; | 41 | int i; |
42 | int len = strlen(key); | 42 | int len = strlen(key); |
diff --git a/libbb/dump.c b/libbb/dump.c index 5ddbbaaf6..0d1bb18f2 100644 --- a/libbb/dump.c +++ b/libbb/dump.c | |||
@@ -26,12 +26,12 @@ static int exitval; /* final exit value */ | |||
26 | int bb_dump_blocksize; /* data block size */ | 26 | int bb_dump_blocksize; /* data block size */ |
27 | int bb_dump_length = -1; /* max bytes to read */ | 27 | int bb_dump_length = -1; /* max bytes to read */ |
28 | 28 | ||
29 | static const char index_str[] = ".#-+ 0123456789"; | 29 | static const char index_str[] ALIGN1 = ".#-+ 0123456789"; |
30 | 30 | ||
31 | static const char size_conv_str[] = | 31 | static const char size_conv_str[] ALIGN1 = |
32 | "\x1\x4\x4\x4\x4\x4\x4\x8\x8\x8\x8\010cdiouxXeEfgG"; | 32 | "\x1\x4\x4\x4\x4\x4\x4\x8\x8\x8\x8\010cdiouxXeEfgG"; |
33 | 33 | ||
34 | static const char lcc[] = "diouxX"; | 34 | static const char lcc[] ALIGN1 = "diouxX"; |
35 | 35 | ||
36 | int bb_dump_size(FS * fs) | 36 | int bb_dump_size(FS * fs) |
37 | { | 37 | { |
@@ -440,7 +440,7 @@ static void bpad(PR * pr) | |||
440 | while ((*p2++ = *p1++) != 0); | 440 | while ((*p2++ = *p1++) != 0); |
441 | } | 441 | } |
442 | 442 | ||
443 | static const char conv_str[] = | 443 | static const char conv_str[] ALIGN1 = |
444 | "\0\\0\0" | 444 | "\0\\0\0" |
445 | "\007\\a\0" /* \a */ | 445 | "\007\\a\0" /* \a */ |
446 | "\b\\b\0" | 446 | "\b\\b\0" |
@@ -479,7 +479,7 @@ static void conv_c(PR * pr, unsigned char * p) | |||
479 | 479 | ||
480 | static void conv_u(PR * pr, unsigned char * p) | 480 | static void conv_u(PR * pr, unsigned char * p) |
481 | { | 481 | { |
482 | static const char list[] = | 482 | static const char list[] ALIGN1 = |
483 | "nul\0soh\0stx\0etx\0eot\0enq\0ack\0bel\0" | 483 | "nul\0soh\0stx\0etx\0eot\0enq\0ack\0bel\0" |
484 | "bs\0_ht\0_lf\0_vt\0_ff\0_cr\0_so\0_si\0_" | 484 | "bs\0_ht\0_lf\0_vt\0_ff\0_cr\0_so\0_si\0_" |
485 | "dle\0dcl\0dc2\0dc3\0dc4\0nak\0syn\0etb\0" | 485 | "dle\0dcl\0dc2\0dc3\0dc4\0nak\0syn\0etb\0" |
diff --git a/libbb/getopt32.c b/libbb/getopt32.c index c7c8cb79c..672d70a0a 100644 --- a/libbb/getopt32.c +++ b/libbb/getopt32.c | |||
@@ -76,7 +76,7 @@ const char *applet_long_options | |||
76 | 76 | ||
77 | This struct allows you to define long options: | 77 | This struct allows you to define long options: |
78 | 78 | ||
79 | static const char applet_longopts[] = | 79 | static const char applet_longopts[] ALIGN1 = |
80 | //"name\0" has_arg val | 80 | //"name\0" has_arg val |
81 | "verbose\0" No_argument "v" | 81 | "verbose\0" No_argument "v" |
82 | ; | 82 | ; |
diff --git a/libbb/human_readable.c b/libbb/human_readable.c index 09fa82c09..d60ef61d7 100644 --- a/libbb/human_readable.c +++ b/libbb/human_readable.c | |||
@@ -31,12 +31,12 @@ | |||
31 | const char *make_human_readable_str(unsigned long long size, | 31 | const char *make_human_readable_str(unsigned long long size, |
32 | unsigned long block_size, unsigned long display_unit) | 32 | unsigned long block_size, unsigned long display_unit) |
33 | { | 33 | { |
34 | /* The code will adjust for additional (appended) units. */ | 34 | /* The code will adjust for additional (appended) units */ |
35 | static const char zero_and_units[] = { '0', 0, 'k', 'M', 'G', 'T' }; | 35 | static const char zero_and_units[] ALIGN1 = { '0', 0, 'k', 'M', 'G', 'T' }; |
36 | static const char fmt[] = "%llu"; | 36 | static const char fmt[] ALIGN1 = "%llu"; |
37 | static const char fmt_tenths[] = "%llu.%d%c"; | 37 | static const char fmt_tenths[] ALIGN1 = "%llu.%d%c"; |
38 | 38 | ||
39 | static char str[21]; /* Sufficient for 64 bit unsigned integers. */ | 39 | static char str[21] ALIGN1; /* Sufficient for 64 bit unsigned integers */ |
40 | 40 | ||
41 | unsigned long long val; | 41 | unsigned long long val; |
42 | int frac; | 42 | int frac; |
@@ -53,7 +53,7 @@ const char *make_human_readable_str(unsigned long long size, | |||
53 | } | 53 | } |
54 | 54 | ||
55 | if (display_unit) { | 55 | if (display_unit) { |
56 | val += display_unit/2; /* Deal with rounding. */ | 56 | val += display_unit/2; /* Deal with rounding */ |
57 | val /= display_unit; /* Don't combine with the line above!!! */ | 57 | val /= display_unit; /* Don't combine with the line above!!! */ |
58 | } else { | 58 | } else { |
59 | ++u; | 59 | ++u; |
diff --git a/libbb/login.c b/libbb/login.c index 1cbadd228..308e1bfed 100644 --- a/libbb/login.c +++ b/libbb/login.c | |||
@@ -15,8 +15,8 @@ | |||
15 | 15 | ||
16 | #define LOGIN " login: " | 16 | #define LOGIN " login: " |
17 | 17 | ||
18 | static const char fmtstr_d[] = "%A, %d %B %Y"; | 18 | static const char fmtstr_d[] ALIGN1 = "%A, %d %B %Y"; |
19 | static const char fmtstr_t[] = "%H:%M:%S"; | 19 | static const char fmtstr_t[] ALIGN1 = "%H:%M:%S"; |
20 | 20 | ||
21 | void print_login_issue(const char *issue_file, const char *tty) | 21 | void print_login_issue(const char *issue_file, const char *tty) |
22 | { | 22 | { |
diff --git a/libbb/md5.c b/libbb/md5.c index e672559cf..9de37b9e4 100644 --- a/libbb/md5.c +++ b/libbb/md5.c | |||
@@ -75,7 +75,7 @@ static void md5_hash_block(const void *buffer, md5_ctx_t *ctx) | |||
75 | 0xf7537e82, 0xbd3af235, 0x2ad7d2bb, 0xeb86d391 | 75 | 0xf7537e82, 0xbd3af235, 0x2ad7d2bb, 0xeb86d391 |
76 | }; | 76 | }; |
77 | 77 | ||
78 | static const char P_array[] = { | 78 | static const char P_array[] ALIGN1 = { |
79 | # if MD5_SIZE_VS_SPEED > 1 | 79 | # if MD5_SIZE_VS_SPEED > 1 |
80 | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, /* 1 */ | 80 | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, /* 1 */ |
81 | # endif /* MD5_SIZE_VS_SPEED > 1 */ | 81 | # endif /* MD5_SIZE_VS_SPEED > 1 */ |
@@ -85,7 +85,7 @@ static void md5_hash_block(const void *buffer, md5_ctx_t *ctx) | |||
85 | }; | 85 | }; |
86 | 86 | ||
87 | # if MD5_SIZE_VS_SPEED > 1 | 87 | # if MD5_SIZE_VS_SPEED > 1 |
88 | static const char S_array[] = { | 88 | static const char S_array[] ALIGN1 = { |
89 | 7, 12, 17, 22, | 89 | 7, 12, 17, 22, |
90 | 5, 9, 14, 20, | 90 | 5, 9, 14, 20, |
91 | 4, 11, 16, 23, | 91 | 4, 11, 16, 23, |
diff --git a/libbb/messages.c b/libbb/messages.c index 8cab2dcc8..c4052b187 100644 --- a/libbb/messages.c +++ b/libbb/messages.c | |||
@@ -12,34 +12,34 @@ | |||
12 | #else | 12 | #else |
13 | #define BANNER "BusyBox v" BB_VER " (" BB_EXTRA_VERSION ")" | 13 | #define BANNER "BusyBox v" BB_VER " (" BB_EXTRA_VERSION ")" |
14 | #endif | 14 | #endif |
15 | const char bb_banner[] = BANNER; | 15 | const char bb_banner[] ALIGN1 = BANNER; |
16 | 16 | ||
17 | const char bb_msg_memory_exhausted[] = "memory exhausted"; | 17 | const char bb_msg_memory_exhausted[] ALIGN1 = "memory exhausted"; |
18 | const char bb_msg_invalid_date[] = "invalid date '%s'"; | 18 | const char bb_msg_invalid_date[] ALIGN1 = "invalid date '%s'"; |
19 | const char bb_msg_write_error[] = "write error"; | 19 | const char bb_msg_write_error[] ALIGN1 = "write error"; |
20 | const char bb_msg_read_error[] = "read error"; | 20 | const char bb_msg_read_error[] ALIGN1 = "read error"; |
21 | const char bb_msg_unknown[] = "(unknown)"; | 21 | const char bb_msg_unknown[] ALIGN1 = "(unknown)"; |
22 | const char bb_msg_can_not_create_raw_socket[] = "can't create raw socket"; | 22 | const char bb_msg_can_not_create_raw_socket[] ALIGN1 = "can't create raw socket"; |
23 | const char bb_msg_perm_denied_are_you_root[] = "permission denied. (are you root?)"; | 23 | const char bb_msg_perm_denied_are_you_root[] ALIGN1 = "permission denied. (are you root?)"; |
24 | const char bb_msg_requires_arg[] = "%s requires an argument"; | 24 | const char bb_msg_requires_arg[] ALIGN1 = "%s requires an argument"; |
25 | const char bb_msg_invalid_arg[] = "invalid argument '%s' to '%s'"; | 25 | const char bb_msg_invalid_arg[] ALIGN1 = "invalid argument '%s' to '%s'"; |
26 | const char bb_msg_standard_input[] = "standard input"; | 26 | const char bb_msg_standard_input[] ALIGN1 = "standard input"; |
27 | const char bb_msg_standard_output[] = "standard output"; | 27 | const char bb_msg_standard_output[] ALIGN1 = "standard output"; |
28 | 28 | ||
29 | const char bb_str_default[] = "default"; | 29 | const char bb_str_default[] ALIGN1 = "default"; |
30 | const char bb_hexdigits_upcase[] = "0123456789ABCDEF"; | 30 | const char bb_hexdigits_upcase[] ALIGN1 = "0123456789ABCDEF"; |
31 | 31 | ||
32 | const char bb_path_passwd_file[] = "/etc/passwd"; | 32 | const char bb_path_passwd_file[] ALIGN1 = "/etc/passwd"; |
33 | const char bb_path_shadow_file[] = "/etc/shadow"; | 33 | const char bb_path_shadow_file[] ALIGN1 = "/etc/shadow"; |
34 | const char bb_path_group_file[] = "/etc/group"; | 34 | const char bb_path_group_file[] ALIGN1 = "/etc/group"; |
35 | const char bb_path_gshadow_file[] = "/etc/gshadow"; | 35 | const char bb_path_gshadow_file[] ALIGN1 = "/etc/gshadow"; |
36 | const char bb_path_motd_file[] = "/etc/motd"; | 36 | const char bb_path_motd_file[] ALIGN1 = "/etc/motd"; |
37 | const char bb_dev_null[] = "/dev/null"; | 37 | const char bb_dev_null[] ALIGN1 = "/dev/null"; |
38 | const char bb_busybox_exec_path[] = CONFIG_BUSYBOX_EXEC_PATH; | 38 | const char bb_busybox_exec_path[] ALIGN1 = CONFIG_BUSYBOX_EXEC_PATH; |
39 | const char bb_default_login_shell[] = LIBBB_DEFAULT_LOGIN_SHELL; | 39 | const char bb_default_login_shell[] ALIGN1 = LIBBB_DEFAULT_LOGIN_SHELL; |
40 | /* util-linux manpage says /sbin:/bin:/usr/sbin:/usr/bin, | 40 | /* util-linux manpage says /sbin:/bin:/usr/sbin:/usr/bin, |
41 | * but I want to save a few bytes here. Check libbb.h before changing! */ | 41 | * but I want to save a few bytes here. Check libbb.h before changing! */ |
42 | const char bb_PATH_root_path[] = "PATH=/sbin:/usr/sbin:/bin:/usr/bin"; | 42 | const char bb_PATH_root_path[] ALIGN1 = "PATH=/sbin:/usr/sbin:/bin:/usr/bin"; |
43 | 43 | ||
44 | 44 | ||
45 | const int const_int_0; | 45 | const int const_int_0; |
@@ -47,7 +47,7 @@ const int const_int_1 = 1; | |||
47 | 47 | ||
48 | #include <utmp.h> | 48 | #include <utmp.h> |
49 | /* This is usually something like "/var/adm/wtmp" or "/var/log/wtmp" */ | 49 | /* This is usually something like "/var/adm/wtmp" or "/var/log/wtmp" */ |
50 | const char bb_path_wtmp_file[] = | 50 | const char bb_path_wtmp_file[] ALIGN1 = |
51 | #if defined _PATH_WTMP | 51 | #if defined _PATH_WTMP |
52 | _PATH_WTMP; | 52 | _PATH_WTMP; |
53 | #elif defined WTMP_FILE | 53 | #elif defined WTMP_FILE |
diff --git a/libbb/mode_string.c b/libbb/mode_string.c index d3ff18375..d17cc4a43 100644 --- a/libbb/mode_string.c +++ b/libbb/mode_string.c | |||
@@ -47,9 +47,9 @@ static const mode_t mode_flags[] = { | |||
47 | 47 | ||
48 | /* The previous version used "0pcCd?bB-?l?s???". However, the '0', 'C', | 48 | /* The previous version used "0pcCd?bB-?l?s???". However, the '0', 'C', |
49 | * and 'B' types don't appear to be available on linux. So I removed them. */ | 49 | * and 'B' types don't appear to be available on linux. So I removed them. */ |
50 | static const char type_chars[16] = "?pc?d?b?-?l?s???"; | 50 | static const char type_chars[16] ALIGN1 = "?pc?d?b?-?l?s???"; |
51 | /* 0123456789abcdef */ | 51 | /* 0123456789abcdef */ |
52 | static const char mode_chars[7] = "rwxSTst"; | 52 | static const char mode_chars[7] ALIGN1 = "rwxSTst"; |
53 | 53 | ||
54 | const char *bb_mode_string(mode_t mode) | 54 | const char *bb_mode_string(mode_t mode) |
55 | { | 55 | { |
diff --git a/libbb/mtab_file.c b/libbb/mtab_file.c index d00405d8a..030b148d3 100644 --- a/libbb/mtab_file.c +++ b/libbb/mtab_file.c | |||
@@ -11,5 +11,5 @@ | |||
11 | 11 | ||
12 | /* Busybox mount uses either /proc/mounts or /etc/mtab to | 12 | /* Busybox mount uses either /proc/mounts or /etc/mtab to |
13 | * get the list of currently mounted filesystems */ | 13 | * get the list of currently mounted filesystems */ |
14 | const char bb_path_mtab_file[] = | 14 | const char bb_path_mtab_file[] ALIGN1 = |
15 | USE_FEATURE_MTAB_SUPPORT("/etc/mtab")SKIP_FEATURE_MTAB_SUPPORT("/proc/mounts"); | 15 | USE_FEATURE_MTAB_SUPPORT("/etc/mtab")SKIP_FEATURE_MTAB_SUPPORT("/proc/mounts"); |
diff --git a/libbb/parse_mode.c b/libbb/parse_mode.c index a31bd4bfd..fd5490039 100644 --- a/libbb/parse_mode.c +++ b/libbb/parse_mode.c | |||
@@ -31,8 +31,8 @@ int bb_parse_mode(const char *s, mode_t *current_mode) | |||
31 | S_ISUID | S_ISGID, /* s */ | 31 | S_ISUID | S_ISGID, /* s */ |
32 | S_ISVTX /* t */ | 32 | S_ISVTX /* t */ |
33 | }; | 33 | }; |
34 | static const char who_chars[] = "augo"; | 34 | static const char who_chars[] ALIGN1 = "augo"; |
35 | static const char perm_chars[] = "rwxXst"; | 35 | static const char perm_chars[] ALIGN1 = "rwxXst"; |
36 | 36 | ||
37 | const char *p; | 37 | const char *p; |
38 | mode_t wholist; | 38 | mode_t wholist; |
diff --git a/libbb/process_escape_sequence.c b/libbb/process_escape_sequence.c index 3178ad34a..1cadbd373 100644 --- a/libbb/process_escape_sequence.c +++ b/libbb/process_escape_sequence.c | |||
@@ -18,7 +18,7 @@ | |||
18 | 18 | ||
19 | char bb_process_escape_sequence(const char **ptr) | 19 | char bb_process_escape_sequence(const char **ptr) |
20 | { | 20 | { |
21 | static const char charmap[] = { | 21 | static const char charmap[] ALIGN1 = { |
22 | 'a', 'b', 'f', 'n', 'r', 't', 'v', '\\', 0, | 22 | 'a', 'b', 'f', 'n', 'r', 't', 'v', '\\', 0, |
23 | '\a', '\b', '\f', '\n', '\r', '\t', '\v', '\\', '\\' }; | 23 | '\a', '\b', '\f', '\n', '\r', '\t', '\v', '\\', '\\' }; |
24 | 24 | ||
diff --git a/libbb/uuencode.c b/libbb/uuencode.c index f525322f8..0aedf3387 100644 --- a/libbb/uuencode.c +++ b/libbb/uuencode.c | |||
@@ -8,7 +8,7 @@ | |||
8 | #include "libbb.h" | 8 | #include "libbb.h" |
9 | 9 | ||
10 | /* Conversion table. for base 64 */ | 10 | /* Conversion table. for base 64 */ |
11 | const char bb_uuenc_tbl_base64[65 + 2] = { | 11 | const char bb_uuenc_tbl_base64[65 + 2] ALIGN1 = { |
12 | 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', | 12 | 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', |
13 | 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', | 13 | 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', |
14 | 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', | 14 | 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', |
@@ -21,7 +21,7 @@ const char bb_uuenc_tbl_base64[65 + 2] = { | |||
21 | '\n', '\0' /* needed for uudecode.c */ | 21 | '\n', '\0' /* needed for uudecode.c */ |
22 | }; | 22 | }; |
23 | 23 | ||
24 | const char bb_uuenc_tbl_std[65] = { | 24 | const char bb_uuenc_tbl_std[65] ALIGN1 = { |
25 | '`', '!', '"', '#', '$', '%', '&', '\'', | 25 | '`', '!', '"', '#', '$', '%', '&', '\'', |
26 | '(', ')', '*', '+', ',', '-', '.', '/', | 26 | '(', ')', '*', '+', ',', '-', '.', '/', |
27 | '0', '1', '2', '3', '4', '5', '6', '7', | 27 | '0', '1', '2', '3', '4', '5', '6', '7', |
diff --git a/libpwdgrp/pwd_grp.c b/libpwdgrp/pwd_grp.c index b535ef5c4..7e7ff4810 100644 --- a/libpwdgrp/pwd_grp.c +++ b/libpwdgrp/pwd_grp.c | |||
@@ -695,7 +695,8 @@ int putpwent(const struct passwd *__restrict p, FILE *__restrict f) | |||
695 | 695 | ||
696 | int putgrent(const struct group *__restrict p, FILE *__restrict f) | 696 | int putgrent(const struct group *__restrict p, FILE *__restrict f) |
697 | { | 697 | { |
698 | static const char format[] = ",%s"; | 698 | static const char format[] ALIGN1 = ",%s"; |
699 | |||
699 | char **m; | 700 | char **m; |
700 | const char *fmt; | 701 | const char *fmt; |
701 | int rv = -1; | 702 | int rv = -1; |
@@ -735,18 +736,19 @@ int putgrent(const struct group *__restrict p, FILE *__restrict f) | |||
735 | } | 736 | } |
736 | 737 | ||
737 | #if ENABLE_USE_BB_SHADOW | 738 | #if ENABLE_USE_BB_SHADOW |
738 | static const unsigned char _sp_off[] = { | 739 | static const unsigned char _sp_off[] ALIGN1 = { |
739 | offsetof(struct spwd, sp_lstchg), /* 2 - not a char ptr */ | 740 | offsetof(struct spwd, sp_lstchg), /* 2 - not a char ptr */ |
740 | offsetof(struct spwd, sp_min), /* 3 - not a char ptr */ | 741 | offsetof(struct spwd, sp_min), /* 3 - not a char ptr */ |
741 | offsetof(struct spwd, sp_max), /* 4 - not a char ptr */ | 742 | offsetof(struct spwd, sp_max), /* 4 - not a char ptr */ |
742 | offsetof(struct spwd, sp_warn), /* 5 - not a char ptr */ | 743 | offsetof(struct spwd, sp_warn), /* 5 - not a char ptr */ |
743 | offsetof(struct spwd, sp_inact), /* 6 - not a char ptr */ | 744 | offsetof(struct spwd, sp_inact), /* 6 - not a char ptr */ |
744 | offsetof(struct spwd, sp_expire), /* 7 - not a char ptr */ | 745 | offsetof(struct spwd, sp_expire) /* 7 - not a char ptr */ |
745 | }; | 746 | }; |
746 | 747 | ||
747 | int putspent(const struct spwd *p, FILE *stream) | 748 | int putspent(const struct spwd *p, FILE *stream) |
748 | { | 749 | { |
749 | static const char ld_format[] = "%ld:"; | 750 | static const char ld_format[] ALIGN1 = "%ld:"; |
751 | |||
750 | const char *f; | 752 | const char *f; |
751 | long x; | 753 | long x; |
752 | int i; | 754 | int i; |
@@ -787,14 +789,14 @@ DO_UNLOCK: | |||
787 | /* Internal uClibc functions. */ | 789 | /* Internal uClibc functions. */ |
788 | /**********************************************************************/ | 790 | /**********************************************************************/ |
789 | 791 | ||
790 | static const unsigned char pw_off[] = { | 792 | static const unsigned char pw_off[] ALIGN1 = { |
791 | offsetof(struct passwd, pw_name), /* 0 */ | 793 | offsetof(struct passwd, pw_name), /* 0 */ |
792 | offsetof(struct passwd, pw_passwd), /* 1 */ | 794 | offsetof(struct passwd, pw_passwd), /* 1 */ |
793 | offsetof(struct passwd, pw_uid), /* 2 - not a char ptr */ | 795 | offsetof(struct passwd, pw_uid), /* 2 - not a char ptr */ |
794 | offsetof(struct passwd, pw_gid), /* 3 - not a char ptr */ | 796 | offsetof(struct passwd, pw_gid), /* 3 - not a char ptr */ |
795 | offsetof(struct passwd, pw_gecos), /* 4 */ | 797 | offsetof(struct passwd, pw_gecos), /* 4 */ |
796 | offsetof(struct passwd, pw_dir), /* 5 */ | 798 | offsetof(struct passwd, pw_dir), /* 5 */ |
797 | offsetof(struct passwd, pw_shell) /* 6 */ | 799 | offsetof(struct passwd, pw_shell) /* 6 */ |
798 | }; | 800 | }; |
799 | 801 | ||
800 | static int bb__parsepwent(void *data, char *line) | 802 | static int bb__parsepwent(void *data, char *line) |
@@ -845,10 +847,10 @@ static int bb__parsepwent(void *data, char *line) | |||
845 | 847 | ||
846 | /**********************************************************************/ | 848 | /**********************************************************************/ |
847 | 849 | ||
848 | static const unsigned char gr_off[] = { | 850 | static const unsigned char gr_off[] ALIGN1 = { |
849 | offsetof(struct group, gr_name), /* 0 */ | 851 | offsetof(struct group, gr_name), /* 0 */ |
850 | offsetof(struct group, gr_passwd), /* 1 */ | 852 | offsetof(struct group, gr_passwd), /* 1 */ |
851 | offsetof(struct group, gr_gid) /* 2 - not a char ptr */ | 853 | offsetof(struct group, gr_gid) /* 2 - not a char ptr */ |
852 | }; | 854 | }; |
853 | 855 | ||
854 | static int bb__parsegrent(void *data, char *line) | 856 | static int bb__parsegrent(void *data, char *line) |
@@ -943,16 +945,16 @@ static int bb__parsegrent(void *data, char *line) | |||
943 | /**********************************************************************/ | 945 | /**********************************************************************/ |
944 | 946 | ||
945 | #if ENABLE_USE_BB_SHADOW | 947 | #if ENABLE_USE_BB_SHADOW |
946 | static const unsigned char sp_off[] = { | 948 | static const unsigned char sp_off[] ALIGN1 = { |
947 | offsetof(struct spwd, sp_namp), /* 0 */ | 949 | offsetof(struct spwd, sp_namp), /* 0 */ |
948 | offsetof(struct spwd, sp_pwdp), /* 1 */ | 950 | offsetof(struct spwd, sp_pwdp), /* 1 */ |
949 | offsetof(struct spwd, sp_lstchg), /* 2 - not a char ptr */ | 951 | offsetof(struct spwd, sp_lstchg), /* 2 - not a char ptr */ |
950 | offsetof(struct spwd, sp_min), /* 3 - not a char ptr */ | 952 | offsetof(struct spwd, sp_min), /* 3 - not a char ptr */ |
951 | offsetof(struct spwd, sp_max), /* 4 - not a char ptr */ | 953 | offsetof(struct spwd, sp_max), /* 4 - not a char ptr */ |
952 | offsetof(struct spwd, sp_warn), /* 5 - not a char ptr */ | 954 | offsetof(struct spwd, sp_warn), /* 5 - not a char ptr */ |
953 | offsetof(struct spwd, sp_inact), /* 6 - not a char ptr */ | 955 | offsetof(struct spwd, sp_inact), /* 6 - not a char ptr */ |
954 | offsetof(struct spwd, sp_expire), /* 7 - not a char ptr */ | 956 | offsetof(struct spwd, sp_expire), /* 7 - not a char ptr */ |
955 | offsetof(struct spwd, sp_flag) /* 8 - not a char ptr */ | 957 | offsetof(struct spwd, sp_flag) /* 8 - not a char ptr */ |
956 | }; | 958 | }; |
957 | 959 | ||
958 | static int bb__parsespent(void *data, char * line) | 960 | static int bb__parsespent(void *data, char * line) |
diff --git a/loginutils/adduser.c b/loginutils/adduser.c index 6c69aaf41..79cd2f4f7 100644 --- a/loginutils/adduser.c +++ b/loginutils/adduser.c | |||
@@ -81,7 +81,8 @@ static void passwd_wrapper(const char *login) ATTRIBUTE_NORETURN; | |||
81 | 81 | ||
82 | static void passwd_wrapper(const char *login) | 82 | static void passwd_wrapper(const char *login) |
83 | { | 83 | { |
84 | static const char prog[] = "passwd"; | 84 | static const char prog[] ALIGN1 = "passwd"; |
85 | |||
85 | BB_EXECLP(prog, prog, login, NULL); | 86 | BB_EXECLP(prog, prog, login, NULL); |
86 | bb_error_msg_and_die("failed to execute '%s', you must set the password for '%s' manually", prog, login); | 87 | bb_error_msg_and_die("failed to execute '%s', you must set the password for '%s' manually", prog, login); |
87 | } | 88 | } |
diff --git a/loginutils/chpasswd.c b/loginutils/chpasswd.c index 3e02c8e7c..6fb4dca7a 100644 --- a/loginutils/chpasswd.c +++ b/loginutils/chpasswd.c | |||
@@ -11,7 +11,7 @@ | |||
11 | #if ENABLE_GETOPT_LONG | 11 | #if ENABLE_GETOPT_LONG |
12 | #include <getopt.h> | 12 | #include <getopt.h> |
13 | 13 | ||
14 | static const char chpasswd_longopts[] = | 14 | static const char chpasswd_longopts[] ALIGN1 = |
15 | "encrypted\0" No_argument "e" | 15 | "encrypted\0" No_argument "e" |
16 | "md5\0" No_argument "m" | 16 | "md5\0" No_argument "m" |
17 | ; | 17 | ; |
diff --git a/loginutils/getty.c b/loginutils/getty.c index 2fcb0d902..0254d3203 100644 --- a/loginutils/getty.c +++ b/loginutils/getty.c | |||
@@ -93,7 +93,7 @@ struct options { | |||
93 | int speeds[MAX_SPEED]; /* baud rates to be tried */ | 93 | int speeds[MAX_SPEED]; /* baud rates to be tried */ |
94 | }; | 94 | }; |
95 | 95 | ||
96 | static const char opt_string[] = "I:LH:f:hil:mt:wn"; | 96 | static const char opt_string[] ALIGN1 = "I:LH:f:hil:mt:wn"; |
97 | #define F_INITSTRING (1<<0) /* initstring is set */ | 97 | #define F_INITSTRING (1<<0) /* initstring is set */ |
98 | #define F_LOCAL (1<<1) /* force local */ | 98 | #define F_LOCAL (1<<1) /* force local */ |
99 | #define F_FAKEHOST (1<<2) /* force fakehost */ | 99 | #define F_FAKEHOST (1<<2) /* force fakehost */ |
diff --git a/loginutils/sulogin.c b/loginutils/sulogin.c index 36b10fbc4..5638c4bc9 100644 --- a/loginutils/sulogin.c +++ b/loginutils/sulogin.c | |||
@@ -9,7 +9,7 @@ | |||
9 | 9 | ||
10 | #include "libbb.h" | 10 | #include "libbb.h" |
11 | 11 | ||
12 | static const char * const forbid[] = { | 12 | static const char *const forbid[] = { |
13 | "ENV", | 13 | "ENV", |
14 | "BASH_ENV", | 14 | "BASH_ENV", |
15 | "HOME", | 15 | "HOME", |
@@ -40,7 +40,7 @@ int sulogin_main(int argc, char **argv) | |||
40 | char *cp; | 40 | char *cp; |
41 | int timeout = 0; | 41 | int timeout = 0; |
42 | char *timeout_arg; | 42 | char *timeout_arg; |
43 | const char * const *p; | 43 | const char *const *p; |
44 | struct passwd *pwd; | 44 | struct passwd *pwd; |
45 | const char *shell; | 45 | const char *shell; |
46 | #if ENABLE_FEATURE_SHADOWPASSWDS | 46 | #if ENABLE_FEATURE_SHADOWPASSWDS |
diff --git a/miscutils/adjtimex.c b/miscutils/adjtimex.c index 9f8227cf0..1e6d15fa7 100644 --- a/miscutils/adjtimex.c +++ b/miscutils/adjtimex.c | |||
@@ -14,7 +14,10 @@ | |||
14 | #include "libbb.h" | 14 | #include "libbb.h" |
15 | #include <sys/timex.h> | 15 | #include <sys/timex.h> |
16 | 16 | ||
17 | static const struct {int bit; const char *name;} statlist[] = { | 17 | static const struct { |
18 | int bit; | ||
19 | const char *name; | ||
20 | } statlist[] = { | ||
18 | { STA_PLL, "PLL" }, | 21 | { STA_PLL, "PLL" }, |
19 | { STA_PPSFREQ, "PPSFREQ" }, | 22 | { STA_PPSFREQ, "PPSFREQ" }, |
20 | { STA_PPSTIME, "PPSTIME" }, | 23 | { STA_PPSTIME, "PPSTIME" }, |
@@ -28,15 +31,17 @@ static const struct {int bit; const char *name;} statlist[] = { | |||
28 | { STA_PPSWANDER, "PPSWANDER" }, | 31 | { STA_PPSWANDER, "PPSWANDER" }, |
29 | { STA_PPSERROR, "PPSERROR" }, | 32 | { STA_PPSERROR, "PPSERROR" }, |
30 | { STA_CLOCKERR, "CLOCKERR" }, | 33 | { STA_CLOCKERR, "CLOCKERR" }, |
31 | { 0, NULL } }; | 34 | { 0, NULL } |
35 | }; | ||
32 | 36 | ||
33 | static const char * const ret_code_descript[] = { | 37 | static const char *const ret_code_descript[] = { |
34 | "clock synchronized", | 38 | "clock synchronized", |
35 | "insert leap second", | 39 | "insert leap second", |
36 | "delete leap second", | 40 | "delete leap second", |
37 | "leap second in progress", | 41 | "leap second in progress", |
38 | "leap second has occurred", | 42 | "leap second has occurred", |
39 | "clock not synchronized" }; | 43 | "clock not synchronized" |
44 | }; | ||
40 | 45 | ||
41 | int adjtimex_main(int argc, char **argv); | 46 | int adjtimex_main(int argc, char **argv); |
42 | int adjtimex_main(int argc, char **argv) | 47 | int adjtimex_main(int argc, char **argv) |
diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c index 848f2b3ea..6b31f368a 100644 --- a/miscutils/devfsd.c +++ b/miscutils/devfsd.c | |||
@@ -245,12 +245,10 @@ static struct config_entry_struct *last_config = NULL; | |||
245 | static char *mount_point = NULL; | 245 | static char *mount_point = NULL; |
246 | static volatile int caught_signal = FALSE; | 246 | static volatile int caught_signal = FALSE; |
247 | static volatile int caught_sighup = FALSE; | 247 | static volatile int caught_sighup = FALSE; |
248 | static struct initial_symlink_struct | 248 | static struct initial_symlink_struct { |
249 | { | ||
250 | const char *dest; | 249 | const char *dest; |
251 | const char *name; | 250 | const char *name; |
252 | } initial_symlinks[] = | 251 | } initial_symlinks[] = { |
253 | { | ||
254 | {"/proc/self/fd", "fd"}, | 252 | {"/proc/self/fd", "fd"}, |
255 | {"fd/0", "stdin"}, | 253 | {"fd/0", "stdin"}, |
256 | {"fd/1", "stdout"}, | 254 | {"fd/1", "stdout"}, |
@@ -258,12 +256,10 @@ static struct initial_symlink_struct | |||
258 | {NULL, NULL}, | 256 | {NULL, NULL}, |
259 | }; | 257 | }; |
260 | 258 | ||
261 | static struct event_type | 259 | static struct event_type { |
262 | { | ||
263 | unsigned int type; /* The DEVFSD_NOTIFY_* value */ | 260 | unsigned int type; /* The DEVFSD_NOTIFY_* value */ |
264 | const char *config_name; /* The name used in the config file */ | 261 | const char *config_name; /* The name used in the config file */ |
265 | } event_types[] = | 262 | } event_types[] = { |
266 | { | ||
267 | {DEVFSD_NOTIFY_REGISTERED, "REGISTER"}, | 263 | {DEVFSD_NOTIFY_REGISTERED, "REGISTER"}, |
268 | {DEVFSD_NOTIFY_UNREGISTERED, "UNREGISTER"}, | 264 | {DEVFSD_NOTIFY_UNREGISTERED, "UNREGISTER"}, |
269 | {DEVFSD_NOTIFY_ASYNC_OPEN, "ASYNC_OPEN"}, | 265 | {DEVFSD_NOTIFY_ASYNC_OPEN, "ASYNC_OPEN"}, |
@@ -277,10 +273,10 @@ static struct event_type | |||
277 | 273 | ||
278 | /* Busybox messages */ | 274 | /* Busybox messages */ |
279 | 275 | ||
280 | static const char * const bb_msg_proto_rev = "protocol revision"; | 276 | static const char bb_msg_proto_rev[] ALIGN1 = "protocol revision"; |
281 | static const char * const bb_msg_bad_config = "bad %s config file: %s"; | 277 | static const char bb_msg_bad_config[] ALIGN1 = "bad %s config file: %s"; |
282 | static const char * const bb_msg_small_buffer = "buffer too small"; | 278 | static const char bb_msg_small_buffer[] ALIGN1 = "buffer too small"; |
283 | static const char * const bb_msg_variable_not_found = "variable: %s not found"; | 279 | static const char bb_msg_variable_not_found[] ALIGN1 = "variable: %s not found"; |
284 | 280 | ||
285 | /* Busybox stuff */ | 281 | /* Busybox stuff */ |
286 | #if ENABLE_DEVFSD_VERBOSE || ENABLE_DEBUG | 282 | #if ENABLE_DEVFSD_VERBOSE || ENABLE_DEBUG |
@@ -387,10 +383,10 @@ int devfsd_main(int argc, char **argv) | |||
387 | 383 | ||
388 | /* NB: The check for CONFIG_FILE is done in read_config_file() */ | 384 | /* NB: The check for CONFIG_FILE is done in read_config_file() */ |
389 | 385 | ||
390 | if (print_version ||(DEVFSD_PROTOCOL_REVISION_DAEMON != proto_rev)) { | 386 | if (print_version || (DEVFSD_PROTOCOL_REVISION_DAEMON != proto_rev)) { |
391 | printf("%s v%s\nDaemon %s:\t%d\nKernel-side %s:\t%d\n", | 387 | printf("%s v%s\nDaemon %s:\t%d\nKernel-side %s:\t%d\n", |
392 | applet_name, DEVFSD_VERSION, bb_msg_proto_rev, | 388 | applet_name, DEVFSD_VERSION, bb_msg_proto_rev, |
393 | DEVFSD_PROTOCOL_REVISION_DAEMON,bb_msg_proto_rev, proto_rev); | 389 | DEVFSD_PROTOCOL_REVISION_DAEMON, bb_msg_proto_rev, proto_rev); |
394 | if (DEVFSD_PROTOCOL_REVISION_DAEMON != proto_rev) | 390 | if (DEVFSD_PROTOCOL_REVISION_DAEMON != proto_rev) |
395 | bb_error_msg_and_die("%s mismatch!", bb_msg_proto_rev); | 391 | bb_error_msg_and_die("%s mismatch!", bb_msg_proto_rev); |
396 | exit(EXIT_SUCCESS); /* -v */ | 392 | exit(EXIT_SUCCESS); /* -v */ |
@@ -509,7 +505,7 @@ static void process_config_line(const char *line, unsigned long *event_mask) | |||
509 | int i; | 505 | int i; |
510 | 506 | ||
511 | /* !!!! Only Uppercase Keywords in devsfd.conf */ | 507 | /* !!!! Only Uppercase Keywords in devsfd.conf */ |
512 | static const char options[] = | 508 | static const char options[] ALIGN1 = |
513 | "CLEAR_CONFIG\0""INCLUDE\0""OPTIONAL_INCLUDE\0" | 509 | "CLEAR_CONFIG\0""INCLUDE\0""OPTIONAL_INCLUDE\0" |
514 | "RESTORE\0""PERMISSIONS\0""MODLOAD\0""EXECUTE\0" | 510 | "RESTORE\0""PERMISSIONS\0""MODLOAD\0""EXECUTE\0" |
515 | "COPY\0""IGNORE\0""MKOLDCOMPAT\0""MKNEWCOMPAT\0" | 511 | "COPY\0""IGNORE\0""MKOLDCOMPAT\0""MKNEWCOMPAT\0" |
diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c index 98cc04fd3..484c97061 100644 --- a/miscutils/hdparm.c +++ b/miscutils/hdparm.c | |||
@@ -128,7 +128,7 @@ | |||
128 | #define CDROM 0x0005 | 128 | #define CDROM 0x0005 |
129 | 129 | ||
130 | #if ENABLE_FEATURE_HDPARM_GET_IDENTITY | 130 | #if ENABLE_FEATURE_HDPARM_GET_IDENTITY |
131 | static const char * const pkt_str[] = { | 131 | static const char *const pkt_str[] = { |
132 | "Direct-access device", /* word 0, bits 12-8 = 00 */ | 132 | "Direct-access device", /* word 0, bits 12-8 = 00 */ |
133 | "Sequential-access device", /* word 0, bits 12-8 = 01 */ | 133 | "Sequential-access device", /* word 0, bits 12-8 = 01 */ |
134 | "Printer", /* word 0, bits 12-8 = 02 */ | 134 | "Printer", /* word 0, bits 12-8 = 02 */ |
@@ -163,7 +163,7 @@ static const char * const pkt_str[] = { | |||
163 | "Unknown", /* word 0, bits 12-8 = 1f */ | 163 | "Unknown", /* word 0, bits 12-8 = 1f */ |
164 | }; | 164 | }; |
165 | 165 | ||
166 | static const char * const ata1_cfg_str[] = { /* word 0 in ATA-1 mode */ | 166 | static const char *const ata1_cfg_str[] = { /* word 0 in ATA-1 mode */ |
167 | "Reserved", /* bit 0 */ | 167 | "Reserved", /* bit 0 */ |
168 | "hard sectored", /* bit 1 */ | 168 | "hard sectored", /* bit 1 */ |
169 | "soft sectored", /* bit 2 */ | 169 | "soft sectored", /* bit 2 */ |
@@ -326,7 +326,7 @@ static const char actual_ver[MINOR_MAX+2] = { | |||
326 | #define NUM_CMD_FEAT_STR 48 | 326 | #define NUM_CMD_FEAT_STR 48 |
327 | 327 | ||
328 | #if ENABLE_FEATURE_HDPARM_GET_IDENTITY | 328 | #if ENABLE_FEATURE_HDPARM_GET_IDENTITY |
329 | static const char * const cmd_feat_str[] = { | 329 | static const char *const cmd_feat_str[] = { |
330 | "", /* word 82 bit 15: obsolete */ | 330 | "", /* word 82 bit 15: obsolete */ |
331 | "NOP cmd", /* word 82 bit 14 */ | 331 | "NOP cmd", /* word 82 bit 14 */ |
332 | "READ BUFFER cmd", /* word 82 bit 13 */ | 332 | "READ BUFFER cmd", /* word 82 bit 13 */ |
@@ -413,7 +413,7 @@ void identify_from_stdin(void); | |||
413 | #define SECU_LEVEL 0x0010 | 413 | #define SECU_LEVEL 0x0010 |
414 | #define NUM_SECU_STR 6 | 414 | #define NUM_SECU_STR 6 |
415 | #if ENABLE_FEATURE_HDPARM_GET_IDENTITY | 415 | #if ENABLE_FEATURE_HDPARM_GET_IDENTITY |
416 | static const char * const secu_str[] = { | 416 | static const char *const secu_str[] = { |
417 | "supported", /* word 128, bit 0 */ | 417 | "supported", /* word 128, bit 0 */ |
418 | "enabled", /* word 128, bit 1 */ | 418 | "enabled", /* word 128, bit 1 */ |
419 | "locked", /* word 128, bit 2 */ | 419 | "locked", /* word 128, bit 2 */ |
@@ -1096,14 +1096,16 @@ static unsigned long hwif_irq; | |||
1096 | // Too bad, really. | 1096 | // Too bad, really. |
1097 | 1097 | ||
1098 | #if ENABLE_FEATURE_HDPARM_GET_IDENTITY | 1098 | #if ENABLE_FEATURE_HDPARM_GET_IDENTITY |
1099 | static const char * const cfg_str[] = | 1099 | static const char *const cfg_str[] = { |
1100 | { "", "HardSect", "SoftSect", "NotMFM", | 1100 | "", "HardSect", "SoftSect", "NotMFM", |
1101 | "HdSw>15uSec", "SpinMotCtl", "Fixed", "Removeable", | 1101 | "HdSw>15uSec", "SpinMotCtl", "Fixed", "Removeable", |
1102 | "DTR<=5Mbs", "DTR>5Mbs", "DTR>10Mbs", "RotSpdTol>.5%", | 1102 | "DTR<=5Mbs", "DTR>5Mbs", "DTR>10Mbs", "RotSpdTol>.5%", |
1103 | "dStbOff", "TrkOff", "FmtGapReq", "nonMagnetic" | 1103 | "dStbOff", "TrkOff", "FmtGapReq", "nonMagnetic" |
1104 | }; | 1104 | }; |
1105 | 1105 | ||
1106 | static const char * const BuffType[] = {"Unknown", "1Sect", "DualPort", "DualPortCache"}; | 1106 | static const char *const BuffType[] = { |
1107 | "Unknown", "1Sect", "DualPort", "DualPortCache" | ||
1108 | }; | ||
1107 | 1109 | ||
1108 | static void dump_identity(const struct hd_driveid *id) | 1110 | static void dump_identity(const struct hd_driveid *id) |
1109 | { | 1111 | { |
@@ -1930,7 +1932,8 @@ static void parse_xfermode(int flag, smallint *get, smallint *set, int *value) | |||
1930 | } | 1932 | } |
1931 | 1933 | ||
1932 | /*------- getopt short options --------*/ | 1934 | /*------- getopt short options --------*/ |
1933 | static const char hdparm_options[] = "gfu::n::p:r::m::c::k::a::B:tTh" | 1935 | static const char hdparm_options[] ALIGN1 = |
1936 | "gfu::n::p:r::m::c::k::a::B:tTh" | ||
1934 | USE_FEATURE_HDPARM_GET_IDENTITY("iI") | 1937 | USE_FEATURE_HDPARM_GET_IDENTITY("iI") |
1935 | USE_FEATURE_HDPARM_HDIO_GETSET_DMA("d::") | 1938 | USE_FEATURE_HDPARM_HDIO_GETSET_DMA("d::") |
1936 | #ifdef HDIO_DRIVE_CMD | 1939 | #ifdef HDIO_DRIVE_CMD |
diff --git a/miscutils/less.c b/miscutils/less.c index a6649c5ca..046a3c459 100644 --- a/miscutils/less.c +++ b/miscutils/less.c | |||
@@ -450,12 +450,12 @@ static void cap_cur_fline(int nlines) | |||
450 | } | 450 | } |
451 | } | 451 | } |
452 | 452 | ||
453 | static const char controls[] = | 453 | static const char controls[] ALIGN1 = |
454 | /* NUL: never encountered; TAB: not converted */ | 454 | /* NUL: never encountered; TAB: not converted */ |
455 | /**/"\x01\x02\x03\x04\x05\x06\x07\x08" "\x0a\x0b\x0c\x0d\x0e\x0f" | 455 | /**/"\x01\x02\x03\x04\x05\x06\x07\x08" "\x0a\x0b\x0c\x0d\x0e\x0f" |
456 | "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f" | 456 | "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f" |
457 | "\x7f\x9b"; /* DEL and infamous Meta-ESC :( */ | 457 | "\x7f\x9b"; /* DEL and infamous Meta-ESC :( */ |
458 | static const char ctrlconv[] = | 458 | static const char ctrlconv[] ALIGN1 = |
459 | /* '\n': it's a former NUL - subst with '@', not 'J' */ | 459 | /* '\n': it's a former NUL - subst with '@', not 'J' */ |
460 | "\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x40\x4b\x4c\x4d\x4e\x4f" | 460 | "\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x40\x4b\x4c\x4d\x4e\x4f" |
461 | "\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"; | 461 | "\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"; |
diff --git a/miscutils/time.c b/miscutils/time.c index 9b7db662a..e8473f702 100644 --- a/miscutils/time.c +++ b/miscutils/time.c | |||
@@ -23,15 +23,15 @@ typedef struct { | |||
23 | 23 | ||
24 | #define UL unsigned long | 24 | #define UL unsigned long |
25 | 25 | ||
26 | static const char default_format[] = "real\t%E\nuser\t%u\nsys\t%T"; | 26 | static const char default_format[] ALIGN1 = "real\t%E\nuser\t%u\nsys\t%T"; |
27 | 27 | ||
28 | /* The output format for the -p option .*/ | 28 | /* The output format for the -p option .*/ |
29 | static const char posix_format[] = "real %e\nuser %U\nsys %S"; | 29 | static const char posix_format[] ALIGN1 = "real %e\nuser %U\nsys %S"; |
30 | 30 | ||
31 | 31 | ||
32 | /* Format string for printing all statistics verbosely. | 32 | /* Format string for printing all statistics verbosely. |
33 | Keep this output to 24 lines so users on terminals can see it all.*/ | 33 | Keep this output to 24 lines so users on terminals can see it all.*/ |
34 | static const char long_format[] = | 34 | static const char long_format[] ALIGN1 = |
35 | "\tCommand being timed: \"%C\"\n" | 35 | "\tCommand being timed: \"%C\"\n" |
36 | "\tUser time (seconds): %U\n" | 36 | "\tUser time (seconds): %U\n" |
37 | "\tSystem time (seconds): %S\n" | 37 | "\tSystem time (seconds): %S\n" |
diff --git a/modutils/insmod.c b/modutils/insmod.c index 8a6cc05dd..c0bc0eb1b 100644 --- a/modutils/insmod.c +++ b/modutils/insmod.c | |||
@@ -3613,12 +3613,12 @@ static int obj_gpl_license(struct obj_file *f, const char **license) | |||
3613 | * linux/include/linux/module.h. Checking for leading "GPL" will not | 3613 | * linux/include/linux/module.h. Checking for leading "GPL" will not |
3614 | * work, somebody will use "GPL sucks, this is proprietary". | 3614 | * work, somebody will use "GPL sucks, this is proprietary". |
3615 | */ | 3615 | */ |
3616 | static const char * const gpl_licenses[] = { | 3616 | static const char *const gpl_licenses[] = { |
3617 | "GPL", | 3617 | "GPL", |
3618 | "GPL v2", | 3618 | "GPL v2", |
3619 | "GPL and additional rights", | 3619 | "GPL and additional rights", |
3620 | "Dual BSD/GPL", | 3620 | "Dual BSD/GPL", |
3621 | "Dual MPL/GPL", | 3621 | "Dual MPL/GPL" |
3622 | }; | 3622 | }; |
3623 | 3623 | ||
3624 | sec = obj_find_section(f, ".modinfo"); | 3624 | sec = obj_find_section(f, ".modinfo"); |
@@ -3681,7 +3681,8 @@ static void set_tainted(struct obj_file *f, int fd, char *m_name, | |||
3681 | /* Check if loading this module will taint the kernel. */ | 3681 | /* Check if loading this module will taint the kernel. */ |
3682 | static void check_tainted_module(struct obj_file *f, char *m_name) | 3682 | static void check_tainted_module(struct obj_file *f, char *m_name) |
3683 | { | 3683 | { |
3684 | static const char tainted_file[] = TAINT_FILENAME; | 3684 | static const char tainted_file[] ALIGN1 = TAINT_FILENAME; |
3685 | |||
3685 | int fd, kernel_has_tainted; | 3686 | int fd, kernel_has_tainted; |
3686 | const char *ptr; | 3687 | const char *ptr; |
3687 | 3688 | ||
@@ -3750,7 +3751,8 @@ static void | |||
3750 | add_ksymoops_symbols(struct obj_file *f, const char *filename, | 3751 | add_ksymoops_symbols(struct obj_file *f, const char *filename, |
3751 | const char *m_name) | 3752 | const char *m_name) |
3752 | { | 3753 | { |
3753 | static const char symprefix[] = "__insmod_"; | 3754 | static const char symprefix[] ALIGN1 = "__insmod_"; |
3755 | |||
3754 | struct obj_section *sec; | 3756 | struct obj_section *sec; |
3755 | struct obj_symbol *sym; | 3757 | struct obj_symbol *sym; |
3756 | char *name, *absolute_filename; | 3758 | char *name, *absolute_filename; |
diff --git a/networking/arp.c b/networking/arp.c index 907433b4a..a5a737349 100644 --- a/networking/arp.c +++ b/networking/arp.c | |||
@@ -46,7 +46,7 @@ static int sockfd; /* active socket descriptor */ | |||
46 | static smallint hw_set; /* flag if hw-type was set (-H) */ | 46 | static smallint hw_set; /* flag if hw-type was set (-H) */ |
47 | static const char *device = ""; /* current device */ | 47 | static const char *device = ""; /* current device */ |
48 | 48 | ||
49 | static const char options[] = | 49 | static const char options[] ALIGN1 = |
50 | "pub\0" | 50 | "pub\0" |
51 | "priv\0" | 51 | "priv\0" |
52 | "temp\0" | 52 | "temp\0" |
diff --git a/networking/ftpgetput.c b/networking/ftpgetput.c index 02e7c5270..f3d6009dd 100644 --- a/networking/ftpgetput.c +++ b/networking/ftpgetput.c | |||
@@ -287,7 +287,7 @@ int ftp_send(ftp_host_info_t *server, FILE *control_stream, | |||
287 | #define FTPGETPUT_OPT_PORT 16 | 287 | #define FTPGETPUT_OPT_PORT 16 |
288 | 288 | ||
289 | #if ENABLE_FEATURE_FTPGETPUT_LONG_OPTIONS | 289 | #if ENABLE_FEATURE_FTPGETPUT_LONG_OPTIONS |
290 | static const char ftpgetput_longopts[] = | 290 | static const char ftpgetput_longopts[] ALIGN1 = |
291 | "continue\0" Required_argument "c" | 291 | "continue\0" Required_argument "c" |
292 | "verbose\0" No_argument "v" | 292 | "verbose\0" No_argument "v" |
293 | "username\0" Required_argument "u" | 293 | "username\0" Required_argument "u" |
diff --git a/networking/httpd.c b/networking/httpd.c index fb3129f0b..b083d645c 100644 --- a/networking/httpd.c +++ b/networking/httpd.c | |||
@@ -98,8 +98,8 @@ | |||
98 | # define PIPE_BUF 4096 | 98 | # define PIPE_BUF 4096 |
99 | #endif | 99 | #endif |
100 | 100 | ||
101 | static const char default_path_httpd_conf[] = "/etc"; | 101 | static const char default_path_httpd_conf[] ALIGN1 = "/etc"; |
102 | static const char httpd_conf[] = "httpd.conf"; | 102 | static const char httpd_conf[] ALIGN1 = "httpd.conf"; |
103 | 103 | ||
104 | #define TIMEOUT 60 | 104 | #define TIMEOUT 60 |
105 | 105 | ||
@@ -202,9 +202,9 @@ struct globals { | |||
202 | ContentLength = -1; \ | 202 | ContentLength = -1; \ |
203 | } while (0) | 203 | } while (0) |
204 | 204 | ||
205 | static const char request_GET[] = "GET"; /* size algorithmic optimize */ | 205 | static const char request_GET[] ALIGN1 = "GET"; /* size algorithmic optimize */ |
206 | 206 | ||
207 | static const char* const suffixTable [] = { | 207 | static const char *const suffixTable[] = { |
208 | /* Warning: shorted equivalent suffix in one line must be first */ | 208 | /* Warning: shorted equivalent suffix in one line must be first */ |
209 | ".htm.html", "text/html", | 209 | ".htm.html", "text/html", |
210 | ".jpg.jpeg", "image/jpeg", | 210 | ".jpg.jpeg", "image/jpeg", |
@@ -288,7 +288,7 @@ static const HttpEnumString httpResponseNames[] = { | |||
288 | }; | 288 | }; |
289 | 289 | ||
290 | 290 | ||
291 | static const char RFC1123FMT[] = "%a, %d %b %Y %H:%M:%S GMT"; | 291 | static const char RFC1123FMT[] ALIGN1 = "%a, %d %b %Y %H:%M:%S GMT"; |
292 | 292 | ||
293 | 293 | ||
294 | #define STRNCASECMP(a, str) strncasecmp((a), (str), sizeof(str)-1) | 294 | #define STRNCASECMP(a, str) strncasecmp((a), (str), sizeof(str)-1) |
@@ -1268,7 +1268,7 @@ static int sendCgi(const char *url, | |||
1268 | * <cr><lf> pair here. We will output "200 OK" line | 1268 | * <cr><lf> pair here. We will output "200 OK" line |
1269 | * if needed, but CGI still has to provide blank line | 1269 | * if needed, but CGI still has to provide blank line |
1270 | * between header and body */ | 1270 | * between header and body */ |
1271 | static const char HTTP_200[] = "HTTP/1.0 200 OK\r\n"; | 1271 | static const char HTTP_200[] ALIGN1 = "HTTP/1.0 200 OK\r\n"; |
1272 | 1272 | ||
1273 | /* Must use safe_read, not full_read, because | 1273 | /* Must use safe_read, not full_read, because |
1274 | * CGI may output a few first bytes and then wait | 1274 | * CGI may output a few first bytes and then wait |
@@ -1343,9 +1343,9 @@ static int sendCgi(const char *url, | |||
1343 | static int sendFile(const char *url) | 1343 | static int sendFile(const char *url) |
1344 | { | 1344 | { |
1345 | char * suffix; | 1345 | char * suffix; |
1346 | int f; | 1346 | int f; |
1347 | const char * const * table; | 1347 | const char *const *table; |
1348 | const char * try_suffix; | 1348 | const char *try_suffix; |
1349 | 1349 | ||
1350 | suffix = strrchr(url, '.'); | 1350 | suffix = strrchr(url, '.'); |
1351 | 1351 | ||
diff --git a/networking/interface.c b/networking/interface.c index 9e6ed63e0..61ce12ef1 100644 --- a/networking/interface.c +++ b/networking/interface.c | |||
@@ -871,7 +871,7 @@ static int hw_null_address(const struct hwtype *hw, void *ap) | |||
871 | return 1; | 871 | return 1; |
872 | } | 872 | } |
873 | 873 | ||
874 | static const char TRext[] = "\0\0\0Ki\0Mi\0Gi\0Ti"; | 874 | static const char TRext[] ALIGN1 = "\0\0\0Ki\0Mi\0Gi\0Ti"; |
875 | 875 | ||
876 | static void print_bytes_scaled(unsigned long long ull, const char *end) | 876 | static void print_bytes_scaled(unsigned long long ull, const char *end) |
877 | { | 877 | { |
@@ -1020,7 +1020,7 @@ static void ife_print(struct interface *ptr) | |||
1020 | if (ptr->flags == 0) { | 1020 | if (ptr->flags == 0) { |
1021 | printf("[NO FLAGS] "); | 1021 | printf("[NO FLAGS] "); |
1022 | } else { | 1022 | } else { |
1023 | static const char ife_print_flags_strs[] = | 1023 | static const char ife_print_flags_strs[] ALIGN1 = |
1024 | "UP\0" | 1024 | "UP\0" |
1025 | "BROADCAST\0" | 1025 | "BROADCAST\0" |
1026 | "DEBUG\0" | 1026 | "DEBUG\0" |
@@ -1038,7 +1038,7 @@ static void ife_print(struct interface *ptr) | |||
1038 | "DYNAMIC\0" | 1038 | "DYNAMIC\0" |
1039 | #endif | 1039 | #endif |
1040 | ; | 1040 | ; |
1041 | static const unsigned short ife_print_flags_mask[] = { | 1041 | static const unsigned short ife_print_flags_mask[] ALIGN2 = { |
1042 | IFF_UP, | 1042 | IFF_UP, |
1043 | IFF_BROADCAST, | 1043 | IFF_BROADCAST, |
1044 | IFF_DEBUG, | 1044 | IFF_DEBUG, |
@@ -1051,9 +1051,9 @@ static void ife_print(struct interface *ptr) | |||
1051 | IFF_ALLMULTI, | 1051 | IFF_ALLMULTI, |
1052 | IFF_SLAVE, | 1052 | IFF_SLAVE, |
1053 | IFF_MASTER, | 1053 | IFF_MASTER, |
1054 | IFF_MULTICAST, | 1054 | IFF_MULTICAST |
1055 | #ifdef HAVE_DYNAMIC | 1055 | #ifdef HAVE_DYNAMIC |
1056 | IFF_DYNAMIC, | 1056 | ,IFF_DYNAMIC |
1057 | #endif | 1057 | #endif |
1058 | }; | 1058 | }; |
1059 | const unsigned short *mask = ife_print_flags_mask; | 1059 | const unsigned short *mask = ife_print_flags_mask; |
diff --git a/networking/ip.c b/networking/ip.c index bf7e84c53..c82d731c1 100644 --- a/networking/ip.c +++ b/networking/ip.c | |||
@@ -82,7 +82,7 @@ int iptunnel_main(int argc, char **argv) | |||
82 | int ip_main(int argc, char **argv); | 82 | int ip_main(int argc, char **argv); |
83 | int ip_main(int argc, char **argv) | 83 | int ip_main(int argc, char **argv) |
84 | { | 84 | { |
85 | static const char keywords[] = | 85 | static const char keywords[] ALIGN1 = |
86 | USE_FEATURE_IP_ADDRESS("address\0") | 86 | USE_FEATURE_IP_ADDRESS("address\0") |
87 | USE_FEATURE_IP_ROUTE("route\0") | 87 | USE_FEATURE_IP_ROUTE("route\0") |
88 | USE_FEATURE_IP_LINK("link\0") | 88 | USE_FEATURE_IP_LINK("link\0") |
diff --git a/networking/ipcalc.c b/networking/ipcalc.c index f3e3ad98f..2a099eff0 100644 --- a/networking/ipcalc.c +++ b/networking/ipcalc.c | |||
@@ -63,7 +63,7 @@ int get_prefix(unsigned long netmask); | |||
63 | #define SILENT 0x20 | 63 | #define SILENT 0x20 |
64 | 64 | ||
65 | #if ENABLE_FEATURE_IPCALC_LONG_OPTIONS | 65 | #if ENABLE_FEATURE_IPCALC_LONG_OPTIONS |
66 | static const char ipcalc_longopts[] = | 66 | static const char ipcalc_longopts[] ALIGN1 = |
67 | "netmask\0" No_argument "m" | 67 | "netmask\0" No_argument "m" |
68 | "broadcast\0" No_argument "b" | 68 | "broadcast\0" No_argument "b" |
69 | "network\0" No_argument "n" | 69 | "network\0" No_argument "n" |
diff --git a/networking/libiproute/ip_parse_common_args.c b/networking/libiproute/ip_parse_common_args.c index 0e429a06f..ff333993f 100644 --- a/networking/libiproute/ip_parse_common_args.c +++ b/networking/libiproute/ip_parse_common_args.c | |||
@@ -26,7 +26,7 @@ void ip_parse_common_args(int *argcp, char ***argvp) | |||
26 | { | 26 | { |
27 | int argc = *argcp; | 27 | int argc = *argcp; |
28 | char **argv = *argvp; | 28 | char **argv = *argvp; |
29 | static const char ip_common_commands[] = | 29 | static const char ip_common_commands[] ALIGN1 = |
30 | "-family\0""inet\0""inet6\0""link\0" | 30 | "-family\0""inet\0""inet6\0""link\0" |
31 | "-4\0""-6\0""-0\0""-oneline\0"; | 31 | "-4\0""-6\0""-0\0""-oneline\0"; |
32 | enum { | 32 | enum { |
diff --git a/networking/libiproute/ipaddress.c b/networking/libiproute/ipaddress.c index 8874fdb0a..6a5f2cfbd 100644 --- a/networking/libiproute/ipaddress.c +++ b/networking/libiproute/ipaddress.c | |||
@@ -412,7 +412,7 @@ static void ipaddr_reset_filter(int _oneline) | |||
412 | /* Return value becomes exitcode. It's okay to not return at all */ | 412 | /* Return value becomes exitcode. It's okay to not return at all */ |
413 | int ipaddr_list_or_flush(int argc, char **argv, int flush) | 413 | int ipaddr_list_or_flush(int argc, char **argv, int flush) |
414 | { | 414 | { |
415 | static const char option[] = "to\0""scope\0""up\0""label\0""dev\0"; | 415 | static const char option[] ALIGN1 = "to\0""scope\0""up\0""label\0""dev\0"; |
416 | 416 | ||
417 | struct nlmsg_list *linfo = NULL; | 417 | struct nlmsg_list *linfo = NULL; |
418 | struct nlmsg_list *ainfo = NULL; | 418 | struct nlmsg_list *ainfo = NULL; |
@@ -599,7 +599,7 @@ static int default_scope(inet_prefix *lcl) | |||
599 | /* Return value becomes exitcode. It's okay to not return at all */ | 599 | /* Return value becomes exitcode. It's okay to not return at all */ |
600 | static int ipaddr_modify(int cmd, int argc, char **argv) | 600 | static int ipaddr_modify(int cmd, int argc, char **argv) |
601 | { | 601 | { |
602 | static const char option[] = | 602 | static const char option[] ALIGN1 = |
603 | "peer\0""remote\0""broadcast\0""brd\0" | 603 | "peer\0""remote\0""broadcast\0""brd\0" |
604 | "anycast\0""scope\0""dev\0""label\0""local\0"; | 604 | "anycast\0""scope\0""dev\0""label\0""local\0"; |
605 | struct rtnl_handle rth; | 605 | struct rtnl_handle rth; |
@@ -768,7 +768,7 @@ static int ipaddr_modify(int cmd, int argc, char **argv) | |||
768 | /* Return value becomes exitcode. It's okay to not return at all */ | 768 | /* Return value becomes exitcode. It's okay to not return at all */ |
769 | int do_ipaddr(int argc, char **argv) | 769 | int do_ipaddr(int argc, char **argv) |
770 | { | 770 | { |
771 | static const char commands[] = | 771 | static const char commands[] ALIGN1 = |
772 | "add\0""delete\0""list\0""show\0""lst\0""flush\0"; | 772 | "add\0""delete\0""list\0""show\0""lst\0""flush\0"; |
773 | 773 | ||
774 | int command_num = 2; /* default command is list */ | 774 | int command_num = 2; /* default command is list */ |
diff --git a/networking/libiproute/iplink.c b/networking/libiproute/iplink.c index 69ce84e49..e1c9c6043 100644 --- a/networking/libiproute/iplink.c +++ b/networking/libiproute/iplink.c | |||
@@ -171,7 +171,7 @@ static int do_set(int argc, char **argv) | |||
171 | struct ifreq ifr0, ifr1; | 171 | struct ifreq ifr0, ifr1; |
172 | char *newname = NULL; | 172 | char *newname = NULL; |
173 | int htype, halen; | 173 | int htype, halen; |
174 | static const char keywords[] = | 174 | static const char keywords[] ALIGN1 = |
175 | "up\0""down\0""name\0""mtu\0""multicast\0""arp\0""addr\0""dev\0" | 175 | "up\0""down\0""name\0""mtu\0""multicast\0""arp\0""addr\0""dev\0" |
176 | "on\0""off\0"; | 176 | "on\0""off\0"; |
177 | enum { ARG_up = 1, ARG_down, ARG_name, ARG_mtu, ARG_multicast, ARG_arp, | 177 | enum { ARG_up = 1, ARG_down, ARG_name, ARG_mtu, ARG_multicast, ARG_arp, |
@@ -275,7 +275,7 @@ static int ipaddr_list_link(int argc, char **argv) | |||
275 | /* Return value becomes exitcode. It's okay to not return at all */ | 275 | /* Return value becomes exitcode. It's okay to not return at all */ |
276 | int do_iplink(int argc, char **argv) | 276 | int do_iplink(int argc, char **argv) |
277 | { | 277 | { |
278 | static const char keywords[] = | 278 | static const char keywords[] ALIGN1 = |
279 | "set\0""show\0""lst\0""list\0"; | 279 | "set\0""show\0""lst\0""list\0"; |
280 | smalluint key; | 280 | smalluint key; |
281 | if (argc <= 0) | 281 | if (argc <= 0) |
diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c index 0d171c785..fbc721049 100644 --- a/networking/libiproute/iproute.c +++ b/networking/libiproute/iproute.c | |||
@@ -294,7 +294,7 @@ static int print_route(struct sockaddr_nl *who ATTRIBUTE_UNUSED, | |||
294 | /* Return value becomes exitcode. It's okay to not return at all */ | 294 | /* Return value becomes exitcode. It's okay to not return at all */ |
295 | static int iproute_modify(int cmd, unsigned flags, int argc, char **argv) | 295 | static int iproute_modify(int cmd, unsigned flags, int argc, char **argv) |
296 | { | 296 | { |
297 | static const char keywords[] = | 297 | static const char keywords[] ALIGN1 = |
298 | "src\0""via\0""mtu\0""lock\0""protocol\0"USE_FEATURE_IP_RULE("table\0") | 298 | "src\0""via\0""mtu\0""lock\0""protocol\0"USE_FEATURE_IP_RULE("table\0") |
299 | "dev\0""oif\0""to\0"; | 299 | "dev\0""oif\0""to\0"; |
300 | enum { | 300 | enum { |
@@ -489,7 +489,7 @@ static int rtnl_rtcache_request(struct rtnl_handle *rth, int family) | |||
489 | 489 | ||
490 | static void iproute_flush_cache(void) | 490 | static void iproute_flush_cache(void) |
491 | { | 491 | { |
492 | static const char fn[] = "/proc/sys/net/ipv4/route/flush"; | 492 | static const char fn[] ALIGN1 = "/proc/sys/net/ipv4/route/flush"; |
493 | int flush_fd = open_or_warn(fn, O_WRONLY); | 493 | int flush_fd = open_or_warn(fn, O_WRONLY); |
494 | 494 | ||
495 | if (flush_fd < 0) { | 495 | if (flush_fd < 0) { |
@@ -517,7 +517,7 @@ static int iproute_list_or_flush(int argc, char **argv, int flush) | |||
517 | struct rtnl_handle rth; | 517 | struct rtnl_handle rth; |
518 | char *id = NULL; | 518 | char *id = NULL; |
519 | char *od = NULL; | 519 | char *od = NULL; |
520 | static const char keywords[] = | 520 | static const char keywords[] ALIGN1 = |
521 | "protocol\0""all\0""dev\0""oif\0""iif\0""via\0""table\0""cache\0" /*all*/ | 521 | "protocol\0""all\0""dev\0""oif\0""iif\0""via\0""table\0""cache\0" /*all*/ |
522 | "from\0""root\0""match\0""exact\0""to\0"/*root match exact*/; | 522 | "from\0""root\0""match\0""exact\0""to\0"/*root match exact*/; |
523 | enum { | 523 | enum { |
@@ -679,7 +679,7 @@ static int iproute_get(int argc, char **argv) | |||
679 | char *odev = NULL; | 679 | char *odev = NULL; |
680 | bool connected = 0; | 680 | bool connected = 0; |
681 | bool from_ok = 0; | 681 | bool from_ok = 0; |
682 | static const char options[] = | 682 | static const char options[] ALIGN1 = |
683 | "from\0""iif\0""oif\0""dev\0""notify\0""connected\0""to\0"; | 683 | "from\0""iif\0""oif\0""dev\0""notify\0""connected\0""to\0"; |
684 | 684 | ||
685 | memset(&req, 0, sizeof(req)); | 685 | memset(&req, 0, sizeof(req)); |
@@ -824,7 +824,7 @@ static int iproute_get(int argc, char **argv) | |||
824 | /* Return value becomes exitcode. It's okay to not return at all */ | 824 | /* Return value becomes exitcode. It's okay to not return at all */ |
825 | int do_iproute(int argc, char **argv) | 825 | int do_iproute(int argc, char **argv) |
826 | { | 826 | { |
827 | static const char ip_route_commands[] = | 827 | static const char ip_route_commands[] ALIGN1 = |
828 | /*0-3*/ "add\0""append\0""change\0""chg\0" | 828 | /*0-3*/ "add\0""append\0""change\0""chg\0" |
829 | /*4-7*/ "delete\0""get\0""list\0""show\0" | 829 | /*4-7*/ "delete\0""get\0""list\0""show\0" |
830 | /*8..*/ "prepend\0""replace\0""test\0""flush\0"; | 830 | /*8..*/ "prepend\0""replace\0""test\0""flush\0"; |
diff --git a/networking/libiproute/iprule.c b/networking/libiproute/iprule.c index 8e2a06f4f..18ae6b5ef 100644 --- a/networking/libiproute/iprule.c +++ b/networking/libiproute/iprule.c | |||
@@ -187,7 +187,7 @@ static int iprule_list(int argc, char **argv) | |||
187 | /* Return value becomes exitcode. It's okay to not return at all */ | 187 | /* Return value becomes exitcode. It's okay to not return at all */ |
188 | static int iprule_modify(int cmd, int argc, char **argv) | 188 | static int iprule_modify(int cmd, int argc, char **argv) |
189 | { | 189 | { |
190 | static const char keywords[] = | 190 | static const char keywords[] ALIGN1 = |
191 | "from\0""to\0""preference\0""order\0""priority\0" | 191 | "from\0""to\0""preference\0""order\0""priority\0" |
192 | "tos\0""fwmark\0""realms\0""table\0""lookup\0""dev\0" | 192 | "tos\0""fwmark\0""realms\0""table\0""lookup\0""dev\0" |
193 | "iif\0""nat\0""map-to\0""type\0""help\0"; | 193 | "iif\0""nat\0""map-to\0""type\0""help\0"; |
@@ -313,7 +313,7 @@ static int iprule_modify(int cmd, int argc, char **argv) | |||
313 | /* Return value becomes exitcode. It's okay to not return at all */ | 313 | /* Return value becomes exitcode. It's okay to not return at all */ |
314 | int do_iprule(int argc, char **argv) | 314 | int do_iprule(int argc, char **argv) |
315 | { | 315 | { |
316 | static const char ip_rule_commands[] = | 316 | static const char ip_rule_commands[] ALIGN1 = |
317 | "add\0""delete\0""list\0""show\0"; | 317 | "add\0""delete\0""list\0""show\0"; |
318 | int cmd = 2; /* list */ | 318 | int cmd = 2; /* list */ |
319 | 319 | ||
diff --git a/networking/libiproute/iptunnel.c b/networking/libiproute/iptunnel.c index a2933879c..2b1713556 100644 --- a/networking/libiproute/iptunnel.c +++ b/networking/libiproute/iptunnel.c | |||
@@ -128,7 +128,7 @@ static int do_del_ioctl(const char *basedev, struct ip_tunnel_parm *p) | |||
128 | /* Dies on error */ | 128 | /* Dies on error */ |
129 | static void parse_args(int argc, char **argv, int cmd, struct ip_tunnel_parm *p) | 129 | static void parse_args(int argc, char **argv, int cmd, struct ip_tunnel_parm *p) |
130 | { | 130 | { |
131 | static const char keywords[] = | 131 | static const char keywords[] ALIGN1 = |
132 | "mode\0""ipip\0""ip/ip\0""gre\0""gre/ip\0""sit\0""ipv6/ip\0" | 132 | "mode\0""ipip\0""ip/ip\0""gre\0""gre/ip\0""sit\0""ipv6/ip\0" |
133 | "key\0""ikey\0""okey\0""seq\0""iseq\0""oseq\0" | 133 | "key\0""ikey\0""okey\0""seq\0""iseq\0""oseq\0" |
134 | "csum\0""icsum\0""ocsum\0""nopmtudisc\0""pmtudisc\0" | 134 | "csum\0""icsum\0""ocsum\0""nopmtudisc\0""pmtudisc\0" |
@@ -519,7 +519,7 @@ static int do_show(int argc, char **argv) | |||
519 | /* Return value becomes exitcode. It's okay to not return at all */ | 519 | /* Return value becomes exitcode. It's okay to not return at all */ |
520 | int do_iptunnel(int argc, char **argv) | 520 | int do_iptunnel(int argc, char **argv) |
521 | { | 521 | { |
522 | static const char keywords[] = | 522 | static const char keywords[] ALIGN1 = |
523 | "add\0""change\0""delete\0""show\0""list\0""lst\0"; | 523 | "add\0""change\0""delete\0""show\0""list\0""lst\0"; |
524 | enum { ARG_add = 0, ARG_change, ARG_del, ARG_show, ARG_list, ARG_lst }; | 524 | enum { ARG_add = 0, ARG_change, ARG_del, ARG_show, ARG_list, ARG_lst }; |
525 | int key; | 525 | int key; |
diff --git a/networking/libiproute/ll_map.c b/networking/libiproute/ll_map.c index e8a8279b0..7b5de92c2 100644 --- a/networking/libiproute/ll_map.c +++ b/networking/libiproute/ll_map.c | |||
@@ -131,7 +131,7 @@ unsigned ll_index_to_flags(int idx) | |||
131 | return 0; | 131 | return 0; |
132 | } | 132 | } |
133 | 133 | ||
134 | int xll_name_to_index(const char * const name) | 134 | int xll_name_to_index(const char *const name) |
135 | { | 135 | { |
136 | int ret = 0; | 136 | int ret = 0; |
137 | int sock_fd; | 137 | int sock_fd; |
diff --git a/networking/libiproute/ll_map.h b/networking/libiproute/ll_map.h index 2dfc84422..55e2cf393 100644 --- a/networking/libiproute/ll_map.h +++ b/networking/libiproute/ll_map.h | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | int ll_remember_index(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg); | 5 | int ll_remember_index(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg); |
6 | int ll_init_map(struct rtnl_handle *rth); | 6 | int ll_init_map(struct rtnl_handle *rth); |
7 | int xll_name_to_index(const char * const name); | 7 | int xll_name_to_index(const char *const name); |
8 | const char *ll_index_to_name(int idx); | 8 | const char *ll_index_to_name(int idx); |
9 | const char *ll_idx_n2a(int idx, char *buf); | 9 | const char *ll_idx_n2a(int idx, char *buf); |
10 | /* int ll_index_to_type(int idx); */ | 10 | /* int ll_index_to_type(int idx); */ |
diff --git a/networking/libiproute/rtm_map.c b/networking/libiproute/rtm_map.c index 96b2d1791..ca2f4436a 100644 --- a/networking/libiproute/rtm_map.c +++ b/networking/libiproute/rtm_map.c | |||
@@ -51,7 +51,7 @@ const char *rtnl_rtntype_n2a(int id, char *buf, int len) | |||
51 | 51 | ||
52 | int rtnl_rtntype_a2n(int *id, char *arg) | 52 | int rtnl_rtntype_a2n(int *id, char *arg) |
53 | { | 53 | { |
54 | static const char keywords[] = | 54 | static const char keywords[] ALIGN1 = |
55 | "local\0""nat\0""broadcast\0""brd\0""anycast\0" | 55 | "local\0""nat\0""broadcast\0""brd\0""anycast\0" |
56 | "multicast\0""prohibit\0""unreachable\0""blackhole\0" | 56 | "multicast\0""prohibit\0""unreachable\0""blackhole\0" |
57 | "xresolve\0""unicast\0""throw\0"; | 57 | "xresolve\0""unicast\0""throw\0"; |
diff --git a/networking/netstat.c b/networking/netstat.c index 746e25091..014e5e251 100644 --- a/networking/netstat.c +++ b/networking/netstat.c | |||
@@ -47,8 +47,7 @@ enum { | |||
47 | TCP_CLOSING /* now a valid state */ | 47 | TCP_CLOSING /* now a valid state */ |
48 | }; | 48 | }; |
49 | 49 | ||
50 | static const char * const tcp_state[] = | 50 | static const char *const tcp_state[] = { |
51 | { | ||
52 | "", | 51 | "", |
53 | "ESTABLISHED", | 52 | "ESTABLISHED", |
54 | "SYN_SENT", | 53 | "SYN_SENT", |
diff --git a/networking/route.c b/networking/route.c index 530c51b10..bfa58da2a 100644 --- a/networking/route.c +++ b/networking/route.c | |||
@@ -73,7 +73,7 @@ | |||
73 | #define HOST_FLAG 2 | 73 | #define HOST_FLAG 2 |
74 | 74 | ||
75 | /* We remap '-' to '#' to avoid problems with getopt. */ | 75 | /* We remap '-' to '#' to avoid problems with getopt. */ |
76 | static const char tbl_hash_net_host[] = | 76 | static const char tbl_hash_net_host[] ALIGN1 = |
77 | "\007\001#net\0" | 77 | "\007\001#net\0" |
78 | /* "\010\002#host\0" */ | 78 | /* "\010\002#host\0" */ |
79 | "\007\002#host" /* Since last, we can save a byte. */ | 79 | "\007\002#host" /* Since last, we can save a byte. */ |
@@ -96,7 +96,7 @@ static const char tbl_hash_net_host[] = | |||
96 | #define KW_IPVx_DYN 042 | 96 | #define KW_IPVx_DYN 042 |
97 | #define KW_IPVx_REINSTATE 043 | 97 | #define KW_IPVx_REINSTATE 043 |
98 | 98 | ||
99 | static const char tbl_ipvx[] = | 99 | static const char tbl_ipvx[] ALIGN1 = |
100 | /* 020 is the "takes an arg" bit */ | 100 | /* 020 is the "takes an arg" bit */ |
101 | #if HAVE_NEW_ADDRT | 101 | #if HAVE_NEW_ADDRT |
102 | "\011\020metric\0" | 102 | "\011\020metric\0" |
@@ -438,7 +438,7 @@ static void INET6_setroute(int action, char **args) | |||
438 | } | 438 | } |
439 | #endif | 439 | #endif |
440 | 440 | ||
441 | static const unsigned int flagvals[] = { /* Must agree with flagchars[]. */ | 441 | static const unsigned flagvals[] = { /* Must agree with flagchars[]. */ |
442 | RTF_GATEWAY, | 442 | RTF_GATEWAY, |
443 | RTF_HOST, | 443 | RTF_HOST, |
444 | RTF_REINSTATE, | 444 | RTF_REINSTATE, |
@@ -454,7 +454,8 @@ static const unsigned int flagvals[] = { /* Must agree with flagchars[]. */ | |||
454 | #define IPV4_MASK (RTF_GATEWAY|RTF_HOST|RTF_REINSTATE|RTF_DYNAMIC|RTF_MODIFIED) | 454 | #define IPV4_MASK (RTF_GATEWAY|RTF_HOST|RTF_REINSTATE|RTF_DYNAMIC|RTF_MODIFIED) |
455 | #define IPV6_MASK (RTF_GATEWAY|RTF_HOST|RTF_DEFAULT|RTF_ADDRCONF|RTF_CACHE) | 455 | #define IPV6_MASK (RTF_GATEWAY|RTF_HOST|RTF_DEFAULT|RTF_ADDRCONF|RTF_CACHE) |
456 | 456 | ||
457 | static const char flagchars[] = /* Must agree with flagvals[]. */ | 457 | /* Must agree with flagvals[]. */ |
458 | static const char flagchars[] ALIGN1 = | ||
458 | "GHRDM" | 459 | "GHRDM" |
459 | #if ENABLE_FEATURE_IPV6 | 460 | #if ENABLE_FEATURE_IPV6 |
460 | "DAC" | 461 | "DAC" |
@@ -631,11 +632,12 @@ static void INET6_displayroutes(int noresolve) | |||
631 | #define ROUTE_OPT_INET6 0x08 /* Not an actual option. See below. */ | 632 | #define ROUTE_OPT_INET6 0x08 /* Not an actual option. See below. */ |
632 | 633 | ||
633 | /* 1st byte is offset to next entry offset. 2nd byte is return value. */ | 634 | /* 1st byte is offset to next entry offset. 2nd byte is return value. */ |
634 | static const char tbl_verb[] = /* 2nd byte matches RTACTION_* code */ | 635 | /* 2nd byte matches RTACTION_* code */ |
636 | static const char tbl_verb[] ALIGN1 = | ||
635 | "\006\001add\0" | 637 | "\006\001add\0" |
636 | "\006\002del\0" | 638 | "\006\002del\0" |
637 | /* "\011\002delete\0" */ | 639 | /* "\011\002delete\0" */ |
638 | "\010\002delete" /* Since last, we can save a byte. */ | 640 | "\010\002delete" /* Since it's last, we can save a byte. */ |
639 | ; | 641 | ; |
640 | 642 | ||
641 | int route_main(int argc, char **argv); | 643 | int route_main(int argc, char **argv); |
diff --git a/networking/slattach.c b/networking/slattach.c index 4bac879d2..f78c88e89 100644 --- a/networking/slattach.c +++ b/networking/slattach.c | |||
@@ -123,7 +123,7 @@ int slattach_main(int argc, char **argv); | |||
123 | int slattach_main(int argc, char **argv) | 123 | int slattach_main(int argc, char **argv) |
124 | { | 124 | { |
125 | /* Line discipline code table */ | 125 | /* Line discipline code table */ |
126 | static const char proto_names[] = | 126 | static const char proto_names[] ALIGN1 = |
127 | "slip\0" /* 0 */ | 127 | "slip\0" /* 0 */ |
128 | "cslip\0" /* 1 */ | 128 | "cslip\0" /* 1 */ |
129 | "slip6\0" /* 2 */ | 129 | "slip6\0" /* 2 */ |
diff --git a/networking/telnet.c b/networking/telnet.c index a634d7a2b..4e8b27ba6 100644 --- a/networking/telnet.c +++ b/networking/telnet.c | |||
@@ -353,7 +353,7 @@ static void putiac_naws(byte c, int x, int y) | |||
353 | } | 353 | } |
354 | #endif | 354 | #endif |
355 | 355 | ||
356 | static char const escapecharis[] = "\r\nEscape character is "; | 356 | static char const escapecharis[] ALIGN1 = "\r\nEscape character is "; |
357 | 357 | ||
358 | static void setConMode(void) | 358 | static void setConMode(void) |
359 | { | 359 | { |
diff --git a/networking/tftp.c b/networking/tftp.c index b20486cc1..85d1a857f 100644 --- a/networking/tftp.c +++ b/networking/tftp.c | |||
@@ -278,7 +278,7 @@ static int tftp( USE_GETPUT(const int cmd,) | |||
278 | "unknown transfer id", | 278 | "unknown transfer id", |
279 | "file already exists", | 279 | "file already exists", |
280 | "no such user", | 280 | "no such user", |
281 | "bad option", | 281 | "bad option" |
282 | }; | 282 | }; |
283 | 283 | ||
284 | const char *msg = ""; | 284 | const char *msg = ""; |
@@ -309,7 +309,7 @@ static int tftp( USE_GETPUT(const int cmd,) | |||
309 | /* htons can be impossible to use in const initializer: */ | 309 | /* htons can be impossible to use in const initializer: */ |
310 | /*static const uint16_t error_8[2] = { htons(TFTP_ERROR), htons(8) };*/ | 310 | /*static const uint16_t error_8[2] = { htons(TFTP_ERROR), htons(8) };*/ |
311 | /* thus we open-code big-endian layout */ | 311 | /* thus we open-code big-endian layout */ |
312 | static const char error_8[4] = { 0,TFTP_ERROR, 0,8 }; | 312 | static const uint8_t error_8[4] = { 0,TFTP_ERROR, 0,8 }; |
313 | xsendto(socketfd, error_8, 4, &peer_lsa->sa, peer_lsa->len); | 313 | xsendto(socketfd, error_8, 4, &peer_lsa->sa, peer_lsa->len); |
314 | bb_error_msg("server proposes bad blksize %d, exiting", blksize); | 314 | bb_error_msg("server proposes bad blksize %d, exiting", blksize); |
315 | goto ret; | 315 | goto ret; |
diff --git a/networking/traceroute.c b/networking/traceroute.c index c87f7ffc5..20f304d53 100644 --- a/networking/traceroute.c +++ b/networking/traceroute.c | |||
@@ -700,7 +700,7 @@ send_probe(int seq, int ttl) | |||
700 | static inline const char * | 700 | static inline const char * |
701 | pr_type(unsigned char t) | 701 | pr_type(unsigned char t) |
702 | { | 702 | { |
703 | static const char * const ttab[] = { | 703 | static const char *const ttab[] = { |
704 | "Echo Reply", "ICMP 1", "ICMP 2", "Dest Unreachable", | 704 | "Echo Reply", "ICMP 1", "ICMP 2", "Dest Unreachable", |
705 | "Source Quench", "Redirect", "ICMP 6", "ICMP 7", | 705 | "Source Quench", "Redirect", "ICMP 6", "ICMP 7", |
706 | "Echo", "Router Advert", "Router Solicit", "Time Exceeded", | 706 | "Echo", "Router Advert", "Router Solicit", "Time Exceeded", |
diff --git a/networking/udhcp/common.c b/networking/udhcp/common.c index 59c015575..a47bbafff 100644 --- a/networking/udhcp/common.c +++ b/networking/udhcp/common.c | |||
@@ -6,4 +6,6 @@ | |||
6 | 6 | ||
7 | #include "common.h" | 7 | #include "common.h" |
8 | 8 | ||
9 | const uint8_t MAC_BCAST_ADDR[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; | 9 | const uint8_t MAC_BCAST_ADDR[6] ALIGN2 = { |
10 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff | ||
11 | }; | ||
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c index efe208814..0e89c3cae 100644 --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c | |||
@@ -180,7 +180,7 @@ int udhcpc_main(int argc, char **argv) | |||
180 | OPT_v = 1 << 17, | 180 | OPT_v = 1 << 17, |
181 | }; | 181 | }; |
182 | #if ENABLE_GETOPT_LONG | 182 | #if ENABLE_GETOPT_LONG |
183 | static const char udhcpc_longopts[] = | 183 | static const char udhcpc_longopts[] ALIGN1 = |
184 | "clientid\0" Required_argument "c" | 184 | "clientid\0" Required_argument "c" |
185 | "clientid-none\0" No_argument "C" | 185 | "clientid-none\0" No_argument "C" |
186 | "vendorclass\0" Required_argument "V" | 186 | "vendorclass\0" Required_argument "V" |
diff --git a/networking/udhcp/dumpleases.c b/networking/udhcp/dumpleases.c index f9f923124..a0765be79 100644 --- a/networking/udhcp/dumpleases.c +++ b/networking/udhcp/dumpleases.c | |||
@@ -24,7 +24,7 @@ int dumpleases_main(int argc, char **argv) | |||
24 | OPT_f = 0x4, // -f | 24 | OPT_f = 0x4, // -f |
25 | }; | 25 | }; |
26 | #if ENABLE_GETOPT_LONG | 26 | #if ENABLE_GETOPT_LONG |
27 | static const char dumpleases_longopts[] = | 27 | static const char dumpleases_longopts[] ALIGN1 = |
28 | "absolute\0" No_argument "a" | 28 | "absolute\0" No_argument "a" |
29 | "remaining\0" No_argument "r" | 29 | "remaining\0" No_argument "r" |
30 | "file\0" Required_argument "f" | 30 | "file\0" Required_argument "f" |
diff --git a/networking/udhcp/options.c b/networking/udhcp/options.c index a58adb9a9..3168fc69a 100644 --- a/networking/udhcp/options.c +++ b/networking/udhcp/options.c | |||
@@ -52,7 +52,7 @@ const struct dhcp_option dhcp_options[] = { | |||
52 | }; | 52 | }; |
53 | 53 | ||
54 | /* Lengths of the different option types */ | 54 | /* Lengths of the different option types */ |
55 | const unsigned char option_lengths[] = { | 55 | const unsigned char option_lengths[] ALIGN1 = { |
56 | [OPTION_IP] = 4, | 56 | [OPTION_IP] = 4, |
57 | [OPTION_IP_PAIR] = 8, | 57 | [OPTION_IP_PAIR] = 8, |
58 | [OPTION_BOOLEAN] = 1, | 58 | [OPTION_BOOLEAN] = 1, |
diff --git a/networking/vconfig.c b/networking/vconfig.c index 4776e1324..8bd88701f 100644 --- a/networking/vconfig.c +++ b/networking/vconfig.c | |||
@@ -63,7 +63,7 @@ static const char *xfind_str(const char *table, const char *str) | |||
63 | return table - 1; | 63 | return table - 1; |
64 | } | 64 | } |
65 | 65 | ||
66 | static const char cmds[] = { | 66 | static const char cmds[] ALIGN1 = { |
67 | 4, ADD_VLAN_CMD, 7, | 67 | 4, ADD_VLAN_CMD, 7, |
68 | 'a', 'd', 'd', 0, | 68 | 'a', 'd', 'd', 0, |
69 | 3, DEL_VLAN_CMD, 7, | 69 | 3, DEL_VLAN_CMD, 7, |
@@ -85,7 +85,7 @@ static const char cmds[] = { | |||
85 | 'm', 'a', 'p', 0, | 85 | 'm', 'a', 'p', 0, |
86 | }; | 86 | }; |
87 | 87 | ||
88 | static const char name_types[] = { | 88 | static const char name_types[] ALIGN1 = { |
89 | VLAN_NAME_TYPE_PLUS_VID, 16, | 89 | VLAN_NAME_TYPE_PLUS_VID, 16, |
90 | 'V', 'L', 'A', 'N', | 90 | 'V', 'L', 'A', 'N', |
91 | '_', 'P', 'L', 'U', 'S', '_', 'V', 'I', 'D', | 91 | '_', 'P', 'L', 'U', 'S', '_', 'V', 'I', 'D', |
@@ -104,7 +104,7 @@ static const char name_types[] = { | |||
104 | '_', 'N', 'O', '_', 'P', 'A', 'D', 0, | 104 | '_', 'N', 'O', '_', 'P', 'A', 'D', 0, |
105 | }; | 105 | }; |
106 | 106 | ||
107 | static const char conf_file_name[] = "/proc/net/vlan/config"; | 107 | static const char conf_file_name[] ALIGN1 = "/proc/net/vlan/config"; |
108 | 108 | ||
109 | int vconfig_main(int argc, char **argv); | 109 | int vconfig_main(int argc, char **argv); |
110 | int vconfig_main(int argc, char **argv) | 110 | int vconfig_main(int argc, char **argv) |
diff --git a/networking/wget.c b/networking/wget.c index 7b583c7ab..d90368c40 100644 --- a/networking/wget.c +++ b/networking/wget.c | |||
@@ -114,7 +114,7 @@ int wget_main(int argc, char **argv) | |||
114 | bool use_proxy = 1; /* Use proxies if env vars are set */ | 114 | bool use_proxy = 1; /* Use proxies if env vars are set */ |
115 | const char *proxy_flag = "on"; /* Use proxies if env vars are set */ | 115 | const char *proxy_flag = "on"; /* Use proxies if env vars are set */ |
116 | const char *user_agent = "Wget";/* "User-Agent" header field */ | 116 | const char *user_agent = "Wget";/* "User-Agent" header field */ |
117 | static const char keywords[] = | 117 | static const char keywords[] ALIGN1 = |
118 | "content-length\0""transfer-encoding\0""chunked\0""location\0"; | 118 | "content-length\0""transfer-encoding\0""chunked\0""location\0"; |
119 | enum { | 119 | enum { |
120 | KEY_content_length = 1, KEY_transfer_encoding, KEY_chunked, KEY_location | 120 | KEY_content_length = 1, KEY_transfer_encoding, KEY_chunked, KEY_location |
@@ -131,7 +131,7 @@ int wget_main(int argc, char **argv) | |||
131 | WGET_OPT_HEADER = 0x100, | 131 | WGET_OPT_HEADER = 0x100, |
132 | }; | 132 | }; |
133 | #if ENABLE_FEATURE_WGET_LONG_OPTIONS | 133 | #if ENABLE_FEATURE_WGET_LONG_OPTIONS |
134 | static const char wget_longopts[] = | 134 | static const char wget_longopts[] ALIGN1 = |
135 | /* name, has_arg, val */ | 135 | /* name, has_arg, val */ |
136 | "continue\0" No_argument "c" | 136 | "continue\0" No_argument "c" |
137 | "spider\0" No_argument "s" | 137 | "spider\0" No_argument "s" |
@@ -539,7 +539,7 @@ static void parse_url(char *src_url, struct host_info *h) | |||
539 | p = strchr(h->host, '#'); if (!sp || (p && sp > p)) sp = p; | 539 | p = strchr(h->host, '#'); if (!sp || (p && sp > p)) sp = p; |
540 | if (!sp) { | 540 | if (!sp) { |
541 | /* must be writable because of bb_get_last_path_component() */ | 541 | /* must be writable because of bb_get_last_path_component() */ |
542 | static char nullstr[] = ""; | 542 | static char nullstr[] ALIGN1 = ""; |
543 | h->path = nullstr; | 543 | h->path = nullstr; |
544 | } else if (*sp == '/') { | 544 | } else if (*sp == '/') { |
545 | *sp = '\0'; | 545 | *sp = '\0'; |
diff --git a/procps/nmeter.c b/procps/nmeter.c index 4f78a1489..127a3d1c1 100644 --- a/procps/nmeter.c +++ b/procps/nmeter.c | |||
@@ -36,7 +36,7 @@ static const char *const proc_name[] = { | |||
36 | "net/dev", | 36 | "net/dev", |
37 | "meminfo", | 37 | "meminfo", |
38 | "diskstats", | 38 | "diskstats", |
39 | "sys/fs/file-nr", | 39 | "sys/fs/file-nr" |
40 | }; | 40 | }; |
41 | 41 | ||
42 | struct globals { | 42 | struct globals { |
@@ -754,7 +754,7 @@ static void collect_info(s_stat *s) | |||
754 | 754 | ||
755 | typedef s_stat* init_func(const char *param); | 755 | typedef s_stat* init_func(const char *param); |
756 | 756 | ||
757 | static const char options[] = "ncmsfixptbdr"; | 757 | static const char options[] ALIGN1 = "ncmsfixptbdr"; |
758 | static init_func *const init_functions[] = { | 758 | static init_func *const init_functions[] = { |
759 | init_if, | 759 | init_if, |
760 | init_cpu, | 760 | init_cpu, |
@@ -767,7 +767,7 @@ static init_func *const init_functions[] = { | |||
767 | init_time, | 767 | init_time, |
768 | init_blk, | 768 | init_blk, |
769 | init_delay, | 769 | init_delay, |
770 | init_cr, | 770 | init_cr |
771 | }; | 771 | }; |
772 | 772 | ||
773 | int nmeter_main(int argc, char **argv); | 773 | int nmeter_main(int argc, char **argv); |
diff --git a/procps/renice.c b/procps/renice.c index 6c5bb0e20..b2a9ed72e 100644 --- a/procps/renice.c +++ b/procps/renice.c | |||
@@ -29,7 +29,7 @@ void BUG_bad_PRIO_USER(void); | |||
29 | int renice_main(int argc, char **argv); | 29 | int renice_main(int argc, char **argv); |
30 | int renice_main(int argc, char **argv) | 30 | int renice_main(int argc, char **argv) |
31 | { | 31 | { |
32 | static const char Xetpriority_msg[] = "%cetpriority"; | 32 | static const char Xetpriority_msg[] ALIGN1 = "%cetpriority"; |
33 | 33 | ||
34 | int retval = EXIT_SUCCESS; | 34 | int retval = EXIT_SUCCESS; |
35 | int which = PRIO_PROCESS; /* Default 'which' value. */ | 35 | int which = PRIO_PROCESS; /* Default 'which' value. */ |
@@ -67,8 +67,9 @@ int renice_main(int argc, char **argv) | |||
67 | while ((arg = *++argv) != NULL) { | 67 | while ((arg = *++argv) != NULL) { |
68 | /* Check for a mode switch. */ | 68 | /* Check for a mode switch. */ |
69 | if (arg[0] == '-' && arg[1]) { | 69 | if (arg[0] == '-' && arg[1]) { |
70 | static const char opts[] | 70 | static const char opts[] ALIGN1 = { |
71 | = { 'p', 'g', 'u', 0, PRIO_PROCESS, PRIO_PGRP, PRIO_USER }; | 71 | 'p', 'g', 'u', 0, PRIO_PROCESS, PRIO_PGRP, PRIO_USER |
72 | }; | ||
72 | const char *p = strchr(opts, arg[1]); | 73 | const char *p = strchr(opts, arg[1]); |
73 | if (p) { | 74 | if (p) { |
74 | which = p[4]; | 75 | which = p[4]; |
diff --git a/procps/sysctl.c b/procps/sysctl.c index a0e9e16e5..5100f57e7 100644 --- a/procps/sysctl.c +++ b/procps/sysctl.c | |||
@@ -27,24 +27,27 @@ static int sysctl_display_all(const char *path, int output, int show_table); | |||
27 | /* | 27 | /* |
28 | * Globals... | 28 | * Globals... |
29 | */ | 29 | */ |
30 | static const char PROC_PATH[] = "/proc/sys/"; | 30 | static const char PROC_PATH[] ALIGN1 = "/proc/sys/"; |
31 | static const char DEFAULT_PRELOAD[] = "/etc/sysctl.conf"; | 31 | static const char DEFAULT_PRELOAD[] ALIGN1 = "/etc/sysctl.conf"; |
32 | 32 | ||
33 | /* error messages */ | 33 | /* error messages */ |
34 | static const char ERR_UNKNOWN_PARAMETER[] = "error: Unknown parameter '%s'\n"; | 34 | static const char ERR_UNKNOWN_PARAMETER[] ALIGN1 = |
35 | static const char ERR_MALFORMED_SETTING[] = "error: Malformed setting '%s'\n"; | 35 | "error: Unknown parameter '%s'\n"; |
36 | static const char ERR_NO_EQUALS[] = | 36 | static const char ERR_MALFORMED_SETTING[] ALIGN1 = |
37 | "error: Malformed setting '%s'\n"; | ||
38 | static const char ERR_NO_EQUALS[] ALIGN1 = | ||
37 | "error: '%s' must be of the form name=value\n"; | 39 | "error: '%s' must be of the form name=value\n"; |
38 | static const char ERR_INVALID_KEY[] = "error: '%s' is an unknown key\n"; | 40 | static const char ERR_INVALID_KEY[] ALIGN1 = |
39 | static const char ERR_UNKNOWN_WRITING[] = | 41 | "error: '%s' is an unknown key\n"; |
42 | static const char ERR_UNKNOWN_WRITING[] ALIGN1 = | ||
40 | "error: unknown error %d setting key '%s'\n"; | 43 | "error: unknown error %d setting key '%s'\n"; |
41 | static const char ERR_UNKNOWN_READING[] = | 44 | static const char ERR_UNKNOWN_READING[] ALIGN1 = |
42 | "error: unknown error %d reading key '%s'\n"; | 45 | "error: unknown error %d reading key '%s'\n"; |
43 | static const char ERR_PERMISSION_DENIED[] = | 46 | static const char ERR_PERMISSION_DENIED[] ALIGN1 = |
44 | "error: permission denied on key '%s'\n"; | 47 | "error: permission denied on key '%s'\n"; |
45 | static const char ERR_PRELOAD_FILE[] = | 48 | static const char ERR_PRELOAD_FILE[] ALIGN1 = |
46 | "error: cannot open preload file '%s'\n"; | 49 | "error: cannot open preload file '%s'\n"; |
47 | static const char WARN_BAD_LINE[] = | 50 | static const char WARN_BAD_LINE[] ALIGN1 = |
48 | "warning: %s(%d): invalid syntax, continuing...\n"; | 51 | "warning: %s(%d): invalid syntax, continuing...\n"; |
49 | 52 | ||
50 | 53 | ||
diff --git a/scripts/mkconfigs b/scripts/mkconfigs index d212ad408..0d1771a36 100755 --- a/scripts/mkconfigs +++ b/scripts/mkconfigs | |||
@@ -44,7 +44,7 @@ echo "\ | |||
44 | * Do not edit. | 44 | * Do not edit. |
45 | * | 45 | * |
46 | */ | 46 | */ |
47 | static const char * const bbconfig_config =" | 47 | static const char *const bbconfig_config =" |
48 | 48 | ||
49 | sed 's/\"/\\\"/g' $config | grep "^#\? \?CONFIG_" | awk '{print "\"" $0 "\\n\"";}' | 49 | sed 's/\"/\\\"/g' $config | grep "^#\? \?CONFIG_" | awk '{print "\"" $0 "\\n\"";}' |
50 | 50 | ||
diff --git a/scripts/trylink b/scripts/trylink index 74acb4cdd..9b67deb49 100755 --- a/scripts/trylink +++ b/scripts/trylink | |||
@@ -6,7 +6,7 @@ try() { | |||
6 | added="$1" | 6 | added="$1" |
7 | shift | 7 | shift |
8 | $debug && echo "Trying: $* $added" | 8 | $debug && echo "Trying: $* $added" |
9 | "$@" $added >busybox.map 2>busybox_ld.err | 9 | "$@" $added 2>busybox_ld.err |
10 | } | 10 | } |
11 | 11 | ||
12 | # Sanitize lib list (dups, extra spaces etc) | 12 | # Sanitize lib list (dups, extra spaces etc) |
@@ -22,14 +22,17 @@ try "-Wl,--start-group $l_list -Wl,--end-group" "$@" \ | |||
22 | cat busybox_ld.err | 22 | cat busybox_ld.err |
23 | exit 1 | 23 | exit 1 |
24 | } | 24 | } |
25 | # Hack: we are not supposed to know executable name, | 25 | |
26 | # but this hack cuts down link time | 26 | #### Hack disabled: conflicts with ld --verbose flag in last link phase |
27 | mv busybox_unstripped busybox_unstripped.tmp | 27 | |
28 | mv busybox.map busybox.map.tmp | 28 | ##### Hack: we are not supposed to know executable name, |
29 | ##### but this hack cuts down link time | ||
30 | ####mv busybox_unstripped busybox_unstripped.tmp | ||
31 | ####mv busybox.map busybox.map.tmp | ||
29 | 32 | ||
30 | # Now try to remove each lib and build without it. | 33 | # Now try to remove each lib and build without it. |
31 | # Stop when no lib can be removed. | 34 | # Stop when no lib can be removed. |
32 | ever_discarded=false | 35 | ####ever_discarded=false |
33 | while test "$BBOX_LIB_LIST"; do | 36 | while test "$BBOX_LIB_LIST"; do |
34 | $debug && echo "Trying libraries: $BBOX_LIB_LIST" | 37 | $debug && echo "Trying libraries: $BBOX_LIB_LIST" |
35 | all_needed=true | 38 | all_needed=true |
@@ -41,7 +44,7 @@ while test "$BBOX_LIB_LIST"; do | |||
41 | echo "Library $one is not needed" | 44 | echo "Library $one is not needed" |
42 | BBOX_LIB_LIST="$without_one" | 45 | BBOX_LIB_LIST="$without_one" |
43 | all_needed=false | 46 | all_needed=false |
44 | ever_discarded=true | 47 | #### ever_discarded=true |
45 | else | 48 | else |
46 | echo "Library $one is needed" | 49 | echo "Library $one is needed" |
47 | fi | 50 | fi |
@@ -54,13 +57,23 @@ while test "$BBOX_LIB_LIST"; do | |||
54 | #{ echo "$BBOX_LIB_LIST" | grep -q ' '; } || break | 57 | #{ echo "$BBOX_LIB_LIST" | grep -q ' '; } || break |
55 | done | 58 | done |
56 | 59 | ||
57 | mv busybox_unstripped.tmp busybox_unstripped | 60 | ####mv busybox_unstripped.tmp busybox_unstripped |
58 | mv busybox.map.tmp busybox.map | 61 | ####mv busybox.map.tmp busybox.map |
59 | $ever_discarded && { | 62 | ####$ever_discarded && { |
60 | # Make the binary with final, minimal list of libs | 63 | # Make the binary with final, minimal list of libs |
61 | echo "Final link with: $BBOX_LIB_LIST" | 64 | echo "Final link with: $BBOX_LIB_LIST" |
62 | l_list=`echo "$BBOX_LIB_LIST" | sed -e 's/ / -l/g' -e 's/^/-l/'` | 65 | l_list=`echo "$BBOX_LIB_LIST" | sed -e 's/ / -l/g' -e 's/^/-l/'` |
63 | try "-Wl,--start-group $l_list -Wl,--end-group" "$@" || exit 1 | 66 | # --verbose gives us gobs of info to stdout (e.g. linker script used) |
64 | } | 67 | try "-Wl,--start-group $l_list -Wl,--end-group -Wl,--verbose" "$@" >busybox_ld.out ####|| exit 1 |
65 | rm busybox_ld.err | 68 | # |
66 | exit 0 # Ensure "success" exit code | 69 | # Add SORT_BY_ALIGNMENT to linker script (found in busybox_ld.out): |
70 | # .rodata : { *(.rodata SORT_BY_ALIGNMENT(.rodata.*) .gnu.linkonce.r.*) } | ||
71 | # *(.data SORT_BY_ALIGNMENT(.data.*) .gnu.linkonce.d.*) | ||
72 | # *(.bss SORT_BY_ALIGNMENT(.bss.*) .gnu.linkonce.b.*) | ||
73 | # This will eliminate most of the data padding. Use linker script | ||
74 | # by commenting "try" above and uncommenting this one (tested on i386): | ||
75 | #try "-Wl,--start-group $l_list -Wl,--end-group -Wl,--verbose -Wl,-T -Wl,busybox_ldscript" "$@" >busybox_ld.out | ||
76 | # | ||
77 | ####} | ||
78 | ####rm busybox_ld.err | ||
79 | ####exit 0 # Ensure "success" exit code | ||
diff --git a/selinux/chcon.c b/selinux/chcon.c index 6e98c4ab9..a9552281d 100644 --- a/selinux/chcon.c +++ b/selinux/chcon.c | |||
@@ -105,7 +105,7 @@ skip: | |||
105 | } | 105 | } |
106 | 106 | ||
107 | #if ENABLE_FEATURE_CHCON_LONG_OPTIONS | 107 | #if ENABLE_FEATURE_CHCON_LONG_OPTIONS |
108 | static const char chcon_longopts[] = | 108 | static const char chcon_longopts[] ALIGN1 = |
109 | "recursive\0" No_argument "R" | 109 | "recursive\0" No_argument "R" |
110 | "changes\0" No_argument "c" | 110 | "changes\0" No_argument "c" |
111 | "no-dereference\0" No_argument "h" | 111 | "no-dereference\0" No_argument "h" |
diff --git a/selinux/runcon.c b/selinux/runcon.c index 5f9e3fd12..6c3f518fc 100644 --- a/selinux/runcon.c +++ b/selinux/runcon.c | |||
@@ -69,7 +69,7 @@ static context_t runcon_compute_new_context(char *user, char *role, char *type, | |||
69 | } | 69 | } |
70 | 70 | ||
71 | #if ENABLE_FEATURE_RUNCON_LONG_OPTIONS | 71 | #if ENABLE_FEATURE_RUNCON_LONG_OPTIONS |
72 | static const char runcon_options[] = | 72 | static const char runcon_longopts[] ALIGN1 = |
73 | "user\0" Required_argument "u" | 73 | "user\0" Required_argument "u" |
74 | "role\0" Required_argument "r" | 74 | "role\0" Required_argument "r" |
75 | "type\0" Required_argument "t" | 75 | "type\0" Required_argument "t" |
@@ -101,7 +101,7 @@ int runcon_main(int argc, char **argv) | |||
101 | selinux_or_die(); | 101 | selinux_or_die(); |
102 | 102 | ||
103 | #if ENABLE_FEATURE_RUNCON_LONG_OPTIONS | 103 | #if ENABLE_FEATURE_RUNCON_LONG_OPTIONS |
104 | applet_long_options = runcon_options; | 104 | applet_long_options = runcon_longopts; |
105 | #endif | 105 | #endif |
106 | opt_complementary = "-1"; | 106 | opt_complementary = "-1"; |
107 | opts = getopt32(argc, argv, "r:t:u:l:ch", &role, &type, &user, &range); | 107 | opts = getopt32(argc, argv, "r:t:u:l:ch", &role, &type, &user, &range); |
diff --git a/selinux/setfiles.c b/selinux/setfiles.c index df77d6053..dcc8cbb5f 100644 --- a/selinux/setfiles.c +++ b/selinux/setfiles.c | |||
@@ -409,7 +409,7 @@ static int apply_spec(const char *file, | |||
409 | 409 | ||
410 | static int canoncon(const char *path, unsigned lineno, char **contextp) | 410 | static int canoncon(const char *path, unsigned lineno, char **contextp) |
411 | { | 411 | { |
412 | static const char err_msg[] = "%s: line %u has invalid context %s"; | 412 | static const char err_msg[] ALIGN1 = "%s: line %u has invalid context %s"; |
413 | 413 | ||
414 | char *tmpcon; | 414 | char *tmpcon; |
415 | char *context = *contextp; | 415 | char *context = *contextp; |
diff --git a/shell/ash.c b/shell/ash.c index d34f5207f..9aec8ee0a 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -91,10 +91,10 @@ static const char *const optletters_optnames[] = { | |||
91 | "a" "allexport", | 91 | "a" "allexport", |
92 | "b" "notify", | 92 | "b" "notify", |
93 | "u" "nounset", | 93 | "u" "nounset", |
94 | "\0" "vi", | 94 | "\0" "vi" |
95 | #if DEBUG | 95 | #if DEBUG |
96 | "\0" "nolog", | 96 | ,"\0" "nolog" |
97 | "\0" "debug", | 97 | ,"\0" "debug" |
98 | #endif | 98 | #endif |
99 | }; | 99 | }; |
100 | 100 | ||
@@ -103,7 +103,7 @@ static const char *const optletters_optnames[] = { | |||
103 | 103 | ||
104 | enum { NOPTS = ARRAY_SIZE(optletters_optnames) }; | 104 | enum { NOPTS = ARRAY_SIZE(optletters_optnames) }; |
105 | 105 | ||
106 | static char optlist[NOPTS]; | 106 | static char optlist[NOPTS] ALIGN1; |
107 | 107 | ||
108 | #define eflag optlist[0] | 108 | #define eflag optlist[0] |
109 | #define fflag optlist[1] | 109 | #define fflag optlist[1] |
@@ -127,12 +127,12 @@ static char optlist[NOPTS]; | |||
127 | 127 | ||
128 | /* ============ Misc data */ | 128 | /* ============ Misc data */ |
129 | 129 | ||
130 | static char nullstr[1]; /* zero length string */ | 130 | static char nullstr[1] ALIGN1; /* zero length string */ |
131 | static const char homestr[] = "HOME"; | 131 | static const char homestr[] ALIGN1 = "HOME"; |
132 | static const char snlfmt[] = "%s\n"; | 132 | static const char snlfmt[] ALIGN1 = "%s\n"; |
133 | static const char illnum[] = "Illegal number: %s"; | 133 | static const char illnum[] ALIGN1 = "Illegal number: %s"; |
134 | 134 | ||
135 | static char *minusc; /* argument to -c option */ | 135 | static char *minusc; /* argument to -c option */ |
136 | 136 | ||
137 | /* pid of main shell */ | 137 | /* pid of main shell */ |
138 | static int rootpid; | 138 | static int rootpid; |
@@ -447,7 +447,9 @@ out2str(const char *p) | |||
447 | #define VSTRIMLEFTMAX 0x9 /* ${var##pattern} */ | 447 | #define VSTRIMLEFTMAX 0x9 /* ${var##pattern} */ |
448 | #define VSLENGTH 0xa /* ${#var} */ | 448 | #define VSLENGTH 0xa /* ${#var} */ |
449 | 449 | ||
450 | static const char dolatstr[] = { CTLVAR, VSNORMAL|VSQUOTE, '@', '=', '\0' }; | 450 | static const char dolatstr[] ALIGN1 = { |
451 | CTLVAR, VSNORMAL|VSQUOTE, '@', '=', '\0' | ||
452 | }; | ||
451 | 453 | ||
452 | #define NCMD 0 | 454 | #define NCMD 0 |
453 | #define NPIPE 1 | 455 | #define NPIPE 1 |
@@ -1583,10 +1585,10 @@ static unsigned long rseed; | |||
1583 | #endif | 1585 | #endif |
1584 | 1586 | ||
1585 | #ifdef IFS_BROKEN | 1587 | #ifdef IFS_BROKEN |
1586 | static const char defifsvar[] = "IFS= \t\n"; | 1588 | static const char defifsvar[] ALIGN1 = "IFS= \t\n"; |
1587 | #define defifs (defifsvar + 4) | 1589 | #define defifs (defifsvar + 4) |
1588 | #else | 1590 | #else |
1589 | static const char defifs[] = " \t\n"; | 1591 | static const char defifs[] ALIGN1 = " \t\n"; |
1590 | #endif | 1592 | #endif |
1591 | 1593 | ||
1592 | struct shparam { | 1594 | struct shparam { |
@@ -2548,16 +2550,16 @@ static const char S_I_T[][3] = { | |||
2548 | static int | 2550 | static int |
2549 | SIT(int c, int syntax) | 2551 | SIT(int c, int syntax) |
2550 | { | 2552 | { |
2551 | static const char spec_symbls[] = "\t\n !\"$&'()*-/:;<=>?[\\]`|}~"; | 2553 | static const char spec_symbls[] ALIGN1 = "\t\n !\"$&'()*-/:;<=>?[\\]`|}~"; |
2552 | #if ENABLE_ASH_ALIAS | 2554 | #if ENABLE_ASH_ALIAS |
2553 | static const char syntax_index_table[] = { | 2555 | static const char syntax_index_table[] ALIGN1 = { |
2554 | 1, 2, 1, 3, 4, 5, 1, 6, /* "\t\n !\"$&'" */ | 2556 | 1, 2, 1, 3, 4, 5, 1, 6, /* "\t\n !\"$&'" */ |
2555 | 7, 8, 3, 3, 3, 3, 1, 1, /* "()*-/:;<" */ | 2557 | 7, 8, 3, 3, 3, 3, 1, 1, /* "()*-/:;<" */ |
2556 | 3, 1, 3, 3, 9, 3, 10, 1, /* "=>?[\\]`|" */ | 2558 | 3, 1, 3, 3, 9, 3, 10, 1, /* "=>?[\\]`|" */ |
2557 | 11, 3 /* "}~" */ | 2559 | 11, 3 /* "}~" */ |
2558 | }; | 2560 | }; |
2559 | #else | 2561 | #else |
2560 | static const char syntax_index_table[] = { | 2562 | static const char syntax_index_table[] ALIGN1 = { |
2561 | 0, 1, 0, 2, 3, 4, 0, 5, /* "\t\n !\"$&'" */ | 2563 | 0, 1, 0, 2, 3, 4, 0, 5, /* "\t\n !\"$&'" */ |
2562 | 6, 7, 2, 2, 2, 2, 0, 0, /* "()*-/:;<" */ | 2564 | 6, 7, 2, 2, 2, 2, 0, 0, /* "()*-/:;<" */ |
2563 | 2, 0, 2, 2, 8, 2, 9, 0, /* "=>?[\\]`|" */ | 2565 | 2, 0, 2, 2, 8, 2, 9, 0, /* "=>?[\\]`|" */ |
@@ -5003,7 +5005,7 @@ esclen(const char *start, const char *p) | |||
5003 | static char * | 5005 | static char * |
5004 | _rmescapes(char *str, int flag) | 5006 | _rmescapes(char *str, int flag) |
5005 | { | 5007 | { |
5006 | static const char qchars[] = { CTLESC, CTLQUOTEMARK, '\0' }; | 5008 | static const char qchars[] ALIGN1 = { CTLESC, CTLQUOTEMARK, '\0' }; |
5007 | 5009 | ||
5008 | char *p, *q, *r; | 5010 | char *p, *q, *r; |
5009 | unsigned inquotes; | 5011 | unsigned inquotes; |
@@ -5420,7 +5422,7 @@ static char *evalvar(char *p, int flag); | |||
5420 | static void | 5422 | static void |
5421 | argstr(char *p, int flag) | 5423 | argstr(char *p, int flag) |
5422 | { | 5424 | { |
5423 | static const char spclchars[] = { | 5425 | static const char spclchars[] ALIGN1 = { |
5424 | '=', | 5426 | '=', |
5425 | ':', | 5427 | ':', |
5426 | CTLQUOTEMARK, | 5428 | CTLQUOTEMARK, |
@@ -6266,7 +6268,7 @@ expsort(struct strlist *str) | |||
6266 | static void | 6268 | static void |
6267 | expandmeta(struct strlist *str, int flag) | 6269 | expandmeta(struct strlist *str, int flag) |
6268 | { | 6270 | { |
6269 | static const char metachars[] = { | 6271 | static const char metachars[] ALIGN1 = { |
6270 | '*', '?', '[', 0 | 6272 | '*', '?', '[', 0 |
6271 | }; | 6273 | }; |
6272 | /* TODO - EXP_REDIR */ | 6274 | /* TODO - EXP_REDIR */ |
@@ -10200,7 +10202,7 @@ parsesub: { | |||
10200 | int typeloc; | 10202 | int typeloc; |
10201 | int flags; | 10203 | int flags; |
10202 | char *p; | 10204 | char *p; |
10203 | static const char types[] = "}-+?="; | 10205 | static const char types[] ALIGN1 = "}-+?="; |
10204 | 10206 | ||
10205 | c = pgetc(); | 10207 | c = pgetc(); |
10206 | if ( | 10208 | if ( |
@@ -10496,13 +10498,15 @@ parsearith: { | |||
10496 | #define NEW_xxreadtoken | 10498 | #define NEW_xxreadtoken |
10497 | #ifdef NEW_xxreadtoken | 10499 | #ifdef NEW_xxreadtoken |
10498 | /* singles must be first! */ | 10500 | /* singles must be first! */ |
10499 | static const char xxreadtoken_chars[7] = { '\n', '(', ')', '&', '|', ';', 0 }; | 10501 | static const char xxreadtoken_chars[7] ALIGN1 = { |
10502 | '\n', '(', ')', '&', '|', ';', 0 | ||
10503 | }; | ||
10500 | 10504 | ||
10501 | static const char xxreadtoken_tokens[] = { | 10505 | static const char xxreadtoken_tokens[] ALIGN1 = { |
10502 | TNL, TLP, TRP, /* only single occurrence allowed */ | 10506 | TNL, TLP, TRP, /* only single occurrence allowed */ |
10503 | TBACKGND, TPIPE, TSEMI, /* if single occurrence */ | 10507 | TBACKGND, TPIPE, TSEMI, /* if single occurrence */ |
10504 | TEOF, /* corresponds to trailing nul */ | 10508 | TEOF, /* corresponds to trailing nul */ |
10505 | TAND, TOR, TENDCASE, /* if double occurrence */ | 10509 | TAND, TOR, TENDCASE /* if double occurrence */ |
10506 | }; | 10510 | }; |
10507 | 10511 | ||
10508 | #define xxreadtoken_doubles \ | 10512 | #define xxreadtoken_doubles \ |
@@ -11379,7 +11383,7 @@ unsetcmd(int argc, char **argv) | |||
11379 | 11383 | ||
11380 | #include <sys/times.h> | 11384 | #include <sys/times.h> |
11381 | 11385 | ||
11382 | static const unsigned char timescmd_str[] = { | 11386 | static const unsigned char timescmd_str[] ALIGN1 = { |
11383 | ' ', offsetof(struct tms, tms_utime), | 11387 | ' ', offsetof(struct tms, tms_utime), |
11384 | '\n', offsetof(struct tms, tms_stime), | 11388 | '\n', offsetof(struct tms, tms_stime), |
11385 | ' ', offsetof(struct tms, tms_cutime), | 11389 | ' ', offsetof(struct tms, tms_cutime), |
@@ -11659,9 +11663,9 @@ readcmd(int argc, char **argv) | |||
11659 | static int | 11663 | static int |
11660 | umaskcmd(int argc, char **argv) | 11664 | umaskcmd(int argc, char **argv) |
11661 | { | 11665 | { |
11662 | static const char permuser[3] = "ugo"; | 11666 | static const char permuser[3] ALIGN1 = "ugo"; |
11663 | static const char permmode[3] = "rwx"; | 11667 | static const char permmode[3] ALIGN1 = "rwx"; |
11664 | static const short int permmask[] = { | 11668 | static const short permmask[] ALIGN2 = { |
11665 | S_IRUSR, S_IWUSR, S_IXUSR, | 11669 | S_IRUSR, S_IWUSR, S_IXUSR, |
11666 | S_IRGRP, S_IWGRP, S_IXGRP, | 11670 | S_IRGRP, S_IWGRP, S_IXGRP, |
11667 | S_IROTH, S_IWOTH, S_IXOTH | 11671 | S_IROTH, S_IWOTH, S_IXOTH |
@@ -12318,7 +12322,7 @@ arith_apply(operator op, v_n_t *numstack, v_n_t **numstackptr) | |||
12318 | } | 12322 | } |
12319 | 12323 | ||
12320 | /* longest must be first */ | 12324 | /* longest must be first */ |
12321 | static const char op_tokens[] = { | 12325 | static const char op_tokens[] ALIGN1 = { |
12322 | '<','<','=',0, TOK_LSHIFT_ASSIGN, | 12326 | '<','<','=',0, TOK_LSHIFT_ASSIGN, |
12323 | '>','>','=',0, TOK_RSHIFT_ASSIGN, | 12327 | '>','>','=',0, TOK_RSHIFT_ASSIGN, |
12324 | '<','<', 0, TOK_LSHIFT, | 12328 | '<','<', 0, TOK_LSHIFT, |
diff --git a/shell/hush.c b/shell/hush.c index 275b69ef3..5796f1127 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -126,7 +126,8 @@ extern char **environ; /* This is in <unistd.h>, but protected with __USE_GNU */ | |||
126 | /* broken, of course, but OK for testing */ | 126 | /* broken, of course, but OK for testing */ |
127 | static const char *indenter(int i) | 127 | static const char *indenter(int i) |
128 | { | 128 | { |
129 | static const char blanks[] = " "; | 129 | static const char blanks[] ALIGN1 = |
130 | " "; | ||
130 | return &blanks[sizeof(blanks) - i - 1]; | 131 | return &blanks[sizeof(blanks) - i - 1]; |
131 | } | 132 | } |
132 | #define debug_printf_clean(...) fprintf(stderr, __VA_ARGS__) | 133 | #define debug_printf_clean(...) fprintf(stderr, __VA_ARGS__) |
@@ -3656,7 +3657,7 @@ static void setup_job_control(void) | |||
3656 | int hush_main(int argc, char **argv); | 3657 | int hush_main(int argc, char **argv); |
3657 | int hush_main(int argc, char **argv) | 3658 | int hush_main(int argc, char **argv) |
3658 | { | 3659 | { |
3659 | static const char version_str[] = "HUSH_VERSION="HUSH_VER_STR; | 3660 | static const char version_str[] ALIGN1 = "HUSH_VERSION="HUSH_VER_STR; |
3660 | static const struct variable const_shell_ver = { | 3661 | static const struct variable const_shell_ver = { |
3661 | .next = NULL, | 3662 | .next = NULL, |
3662 | .varstr = (char*)version_str, | 3663 | .varstr = (char*)version_str, |
diff --git a/shell/lash.c b/shell/lash.c index e5c7ef670..c28a1034a 100644 --- a/shell/lash.c +++ b/shell/lash.c | |||
@@ -711,7 +711,7 @@ static char * strsep_space(char *string, int * ix) | |||
711 | 711 | ||
712 | static int expand_arguments(char *command) | 712 | static int expand_arguments(char *command) |
713 | { | 713 | { |
714 | static const char out_of_space[] = "out of space during expansion"; | 714 | static const char out_of_space[] ALIGN1 = "out of space during expansion"; |
715 | 715 | ||
716 | int total_length = 0, length, i, retval, ix = 0; | 716 | int total_length = 0, length, i, retval, ix = 0; |
717 | expand_t expand_result; | 717 | expand_t expand_result; |
diff --git a/shell/msh.c b/shell/msh.c index effdc0107..f1b3f0525 100644 --- a/shell/msh.c +++ b/shell/msh.c | |||
@@ -280,7 +280,7 @@ struct brkcon { | |||
280 | * -x: trace | 280 | * -x: trace |
281 | * -u: unset variables net diagnostic | 281 | * -u: unset variables net diagnostic |
282 | */ | 282 | */ |
283 | static char flags['z' - 'a' + 1]; | 283 | static char flags['z' - 'a' + 1] ALIGN1; |
284 | /* this looks weird, but is OK ... we index FLAG with 'a'...'z' */ | 284 | /* this looks weird, but is OK ... we index FLAG with 'a'...'z' */ |
285 | #define FLAG (flags - 'a') | 285 | #define FLAG (flags - 'a') |
286 | 286 | ||
@@ -577,7 +577,7 @@ struct here { | |||
577 | struct here *h_next; | 577 | struct here *h_next; |
578 | }; | 578 | }; |
579 | 579 | ||
580 | static const char * const signame[] = { | 580 | static const char *const signame[] = { |
581 | "Signal 0", | 581 | "Signal 0", |
582 | "Hangup", | 582 | "Hangup", |
583 | NULL, /* interrupt */ | 583 | NULL, /* interrupt */ |
@@ -593,11 +593,10 @@ static const char * const signame[] = { | |||
593 | "SIGUSR2", | 593 | "SIGUSR2", |
594 | NULL, /* broken pipe */ | 594 | NULL, /* broken pipe */ |
595 | "Alarm clock", | 595 | "Alarm clock", |
596 | "Terminated", | 596 | "Terminated" |
597 | }; | 597 | }; |
598 | 598 | ||
599 | 599 | ||
600 | |||
601 | struct res { | 600 | struct res { |
602 | const char *r_name; | 601 | const char *r_name; |
603 | int r_val; | 602 | int r_val; |
@@ -4209,7 +4208,7 @@ static char *unquote(char *as) | |||
4209 | #define NDENT ((BLKSIZ+sizeof(struct dirent)-1)/sizeof(struct dirent)) | 4208 | #define NDENT ((BLKSIZ+sizeof(struct dirent)-1)/sizeof(struct dirent)) |
4210 | 4209 | ||
4211 | static struct wdblock *cl, *nl; | 4210 | static struct wdblock *cl, *nl; |
4212 | static char spcl[] = "[?*"; | 4211 | static const char spcl[] ALIGN1= "[?*"; |
4213 | 4212 | ||
4214 | static struct wdblock *glob(char *cp, struct wdblock *wb) | 4213 | static struct wdblock *glob(char *cp, struct wdblock *wb) |
4215 | { | 4214 | { |
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c index 0a8dbe94c..2933db472 100644 --- a/util-linux/fdisk.c +++ b/util-linux/fdisk.c | |||
@@ -48,12 +48,12 @@ struct hd_geometry { | |||
48 | 48 | ||
49 | #define HDIO_GETGEO 0x0301 /* get device geometry */ | 49 | #define HDIO_GETGEO 0x0301 /* get device geometry */ |
50 | 50 | ||
51 | static const char msg_building_new_label[] = | 51 | static const char msg_building_new_label[] ALIGN1 = |
52 | "Building a new %s. Changes will remain in memory only,\n" | 52 | "Building a new %s. Changes will remain in memory only,\n" |
53 | "until you decide to write them. After that the previous content\n" | 53 | "until you decide to write them. After that the previous content\n" |
54 | "won't be recoverable.\n\n"; | 54 | "won't be recoverable.\n\n"; |
55 | 55 | ||
56 | static const char msg_part_already_defined[] = | 56 | static const char msg_part_already_defined[] ALIGN1 = |
57 | "Partition %d is already defined, delete it before re-adding\n"; | 57 | "Partition %d is already defined, delete it before re-adding\n"; |
58 | 58 | ||
59 | 59 | ||
@@ -82,11 +82,11 @@ struct partition { | |||
82 | unsigned char size4[4]; /* nr of sectors in partition */ | 82 | unsigned char size4[4]; /* nr of sectors in partition */ |
83 | } ATTRIBUTE_PACKED; | 83 | } ATTRIBUTE_PACKED; |
84 | 84 | ||
85 | static const char unable_to_open[] = "cannot open %s"; | 85 | static const char unable_to_open[] ALIGN1 = "cannot open %s"; |
86 | static const char unable_to_read[] = "cannot read from %s"; | 86 | static const char unable_to_read[] ALIGN1 = "cannot read from %s"; |
87 | static const char unable_to_seek[] = "cannot seek on %s"; | 87 | static const char unable_to_seek[] ALIGN1 = "cannot seek on %s"; |
88 | static const char unable_to_write[] = "cannot write to %s"; | 88 | static const char unable_to_write[] ALIGN1 = "cannot write to %s"; |
89 | static const char ioctl_error[] = "BLKGETSIZE ioctl failed on %s"; | 89 | static const char ioctl_error[] ALIGN1 = "BLKGETSIZE ioctl failed on %s"; |
90 | static void fdisk_fatal(const char *why) ATTRIBUTE_NORETURN; | 90 | static void fdisk_fatal(const char *why) ATTRIBUTE_NORETURN; |
91 | 91 | ||
92 | enum label_type { | 92 | enum label_type { |
diff --git a/util-linux/fdisk_osf.c b/util-linux/fdisk_osf.c index 9f0dc7fd3..f6486d5f9 100644 --- a/util-linux/fdisk_osf.c +++ b/util-linux/fdisk_osf.c | |||
@@ -149,7 +149,7 @@ struct xbsd_disklabel { | |||
149 | #define BSD_DSTYPE_DOSPART(s) ((s) & 3) /* dos partition number */ | 149 | #define BSD_DSTYPE_DOSPART(s) ((s) & 3) /* dos partition number */ |
150 | #define BSD_DSTYPE_GEOMETRY 0x10 /* drive params in label */ | 150 | #define BSD_DSTYPE_GEOMETRY 0x10 /* drive params in label */ |
151 | 151 | ||
152 | static const char * const xbsd_dktypenames[] = { | 152 | static const char *const xbsd_dktypenames[] = { |
153 | "unknown", | 153 | "unknown", |
154 | "SMD", | 154 | "SMD", |
155 | "MSCP", | 155 | "MSCP", |
diff --git a/util-linux/getopt.c b/util-linux/getopt.c index 41299d2c3..246017036 100644 --- a/util-linux/getopt.c +++ b/util-linux/getopt.c | |||
@@ -266,7 +266,7 @@ static void set_shell(const char *new_shell) | |||
266 | */ | 266 | */ |
267 | 267 | ||
268 | #if ENABLE_GETOPT_LONG | 268 | #if ENABLE_GETOPT_LONG |
269 | static const char getopt_longopts[] = | 269 | static const char getopt_longopts[] ALIGN1 = |
270 | "options\0" Required_argument "o" | 270 | "options\0" Required_argument "o" |
271 | "longoptions\0" Required_argument "l" | 271 | "longoptions\0" Required_argument "l" |
272 | "quiet\0" No_argument "q" | 272 | "quiet\0" No_argument "q" |
diff --git a/util-linux/hexdump.c b/util-linux/hexdump.c index 213f6071b..e294f19da 100644 --- a/util-linux/hexdump.c +++ b/util-linux/hexdump.c | |||
@@ -35,7 +35,7 @@ static void bb_dump_addfile(char *name) | |||
35 | fclose(fp); | 35 | fclose(fp); |
36 | } | 36 | } |
37 | 37 | ||
38 | static const char * const add_strings[] = { | 38 | static const char *const add_strings[] = { |
39 | "\"%07.7_ax \" 16/1 \"%03o \" \"\\n\"", /* b */ | 39 | "\"%07.7_ax \" 16/1 \"%03o \" \"\\n\"", /* b */ |
40 | "\"%07.7_ax \" 16/1 \"%3_c \" \"\\n\"", /* c */ | 40 | "\"%07.7_ax \" 16/1 \"%3_c \" \"\\n\"", /* c */ |
41 | "\"%07.7_ax \" 8/2 \" %05u \" \"\\n\"", /* d */ | 41 | "\"%07.7_ax \" 8/2 \" %05u \" \"\\n\"", /* d */ |
@@ -43,9 +43,9 @@ static const char * const add_strings[] = { | |||
43 | "\"%07.7_ax \" 8/2 \" %04x \" \"\\n\"", /* x */ | 43 | "\"%07.7_ax \" 8/2 \" %04x \" \"\\n\"", /* x */ |
44 | }; | 44 | }; |
45 | 45 | ||
46 | static const char add_first[] = "\"%07.7_Ax\n\""; | 46 | static const char add_first[] ALIGN1 = "\"%07.7_Ax\n\""; |
47 | 47 | ||
48 | static const char hexdump_opts[] = "bcdoxCe:f:n:s:v"; | 48 | static const char hexdump_opts[] ALIGN1 = "bcdoxCe:f:n:s:v"; |
49 | 49 | ||
50 | static const struct suffix_mult suffixes[] = { | 50 | static const struct suffix_mult suffixes[] = { |
51 | { "b", 512 }, | 51 | { "b", 512 }, |
diff --git a/util-linux/hwclock.c b/util-linux/hwclock.c index ede95ecaa..867721482 100644 --- a/util-linux/hwclock.c +++ b/util-linux/hwclock.c | |||
@@ -178,7 +178,7 @@ int hwclock_main(int argc, char **argv) | |||
178 | int utc; | 178 | int utc; |
179 | 179 | ||
180 | #if ENABLE_FEATURE_HWCLOCK_LONG_OPTIONS | 180 | #if ENABLE_FEATURE_HWCLOCK_LONG_OPTIONS |
181 | static const char hwclock_longopts[] = | 181 | static const char hwclock_longopts[] ALIGN1 = |
182 | "localtime\0" No_argument "l" | 182 | "localtime\0" No_argument "l" |
183 | "utc\0" No_argument "u" | 183 | "utc\0" No_argument "u" |
184 | "show\0" No_argument "r" | 184 | "show\0" No_argument "r" |
diff --git a/util-linux/mdev.c b/util-linux/mdev.c index 17e5e88c6..33dc5d38f 100644 --- a/util-linux/mdev.c +++ b/util-linux/mdev.c | |||
@@ -233,7 +233,7 @@ static int dirAction(const char *fileName, struct stat *statbuf, | |||
233 | * - userspace writes "0" (worked) or "-1" (failed) to /sys/$DEVPATH/loading | 233 | * - userspace writes "0" (worked) or "-1" (failed) to /sys/$DEVPATH/loading |
234 | * - kernel loads firmware into device | 234 | * - kernel loads firmware into device |
235 | */ | 235 | */ |
236 | static inline void load_firmware(const char * const firmware, const char * const sysfs_path) | 236 | static void load_firmware(const char *const firmware, const char *const sysfs_path) |
237 | { | 237 | { |
238 | int cnt; | 238 | int cnt; |
239 | int firmware_fd, loading_fd, data_fd; | 239 | int firmware_fd, loading_fd, data_fd; |
diff --git a/util-linux/mount.c b/util-linux/mount.c index a7b0a98f0..c159f41e1 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c | |||
@@ -888,7 +888,7 @@ static int nfsmount(struct mntent *mp, int vfsflags, char *filteropts) | |||
888 | if (filteropts) for (opt = strtok(filteropts, ","); opt; opt = strtok(NULL, ",")) { | 888 | if (filteropts) for (opt = strtok(filteropts, ","); opt; opt = strtok(NULL, ",")) { |
889 | char *opteq = strchr(opt, '='); | 889 | char *opteq = strchr(opt, '='); |
890 | if (opteq) { | 890 | if (opteq) { |
891 | static const char options[] = | 891 | static const char options[] ALIGN1 = |
892 | /* 0 */ "rsize\0" | 892 | /* 0 */ "rsize\0" |
893 | /* 1 */ "wsize\0" | 893 | /* 1 */ "wsize\0" |
894 | /* 2 */ "timeo\0" | 894 | /* 2 */ "timeo\0" |
@@ -991,7 +991,7 @@ static int nfsmount(struct mntent *mp, int vfsflags, char *filteropts) | |||
991 | } | 991 | } |
992 | } | 992 | } |
993 | else { | 993 | else { |
994 | static const char options[] = | 994 | static const char options[] ALIGN1 = |
995 | "bg\0" | 995 | "bg\0" |
996 | "fg\0" | 996 | "fg\0" |
997 | "soft\0" | 997 | "soft\0" |
@@ -1524,7 +1524,7 @@ static int singlemount(struct mntent *mp, int ignore_busy) | |||
1524 | // Parse options, if necessary parse fstab/mtab, and call singlemount for | 1524 | // Parse options, if necessary parse fstab/mtab, and call singlemount for |
1525 | // each directory to be mounted. | 1525 | // each directory to be mounted. |
1526 | 1526 | ||
1527 | static const char must_be_root[] = "you must be root"; | 1527 | static const char must_be_root[] ALIGN1 = "you must be root"; |
1528 | 1528 | ||
1529 | int mount_main(int argc, char **argv); | 1529 | int mount_main(int argc, char **argv); |
1530 | int mount_main(int argc, char **argv) | 1530 | int mount_main(int argc, char **argv) |
diff --git a/util-linux/readprofile.c b/util-linux/readprofile.c index 02afedcf0..347621c19 100644 --- a/util-linux/readprofile.c +++ b/util-linux/readprofile.c | |||
@@ -38,8 +38,8 @@ | |||
38 | #define S_LEN 128 | 38 | #define S_LEN 128 |
39 | 39 | ||
40 | /* These are the defaults */ | 40 | /* These are the defaults */ |
41 | static const char defaultmap[] = "/boot/System.map"; | 41 | static const char defaultmap[] ALIGN1 = "/boot/System.map"; |
42 | static const char defaultpro[] = "/proc/profile"; | 42 | static const char defaultpro[] ALIGN1 = "/proc/profile"; |
43 | 43 | ||
44 | int readprofile_main(int argc, char **argv); | 44 | int readprofile_main(int argc, char **argv); |
45 | int readprofile_main(int argc, char **argv) | 45 | int readprofile_main(int argc, char **argv) |