diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2019-10-25 12:12:22 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2019-10-25 12:12:22 +0200 |
commit | af7169b4a70eb3f60555ced17a40780f70aaaa5c (patch) | |
tree | 1633c3306b7d538fb44b12d27ec299e8db0f35fa /libbb | |
parent | e1a7c97ac640701973eea000007fc8b9f9dd7126 (diff) | |
download | busybox-w32-af7169b4a70eb3f60555ced17a40780f70aaaa5c.tar.gz busybox-w32-af7169b4a70eb3f60555ced17a40780f70aaaa5c.tar.bz2 busybox-w32-af7169b4a70eb3f60555ced17a40780f70aaaa5c.zip |
clang/llvm 9 fix - do not eliminate a store to a fake "const"
This is *much* better (9 kbytes better) than dropping "*const"
optimization trick.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/appletlib.c | 2 | ||||
-rw-r--r-- | libbb/lineedit.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libbb/appletlib.c b/libbb/appletlib.c index 9fa17cfa1..f842e73cc 100644 --- a/libbb/appletlib.c +++ b/libbb/appletlib.c | |||
@@ -304,7 +304,7 @@ void lbb_prepare(const char *applet | |||
304 | IF_FEATURE_INDIVIDUAL(, char **argv)) | 304 | IF_FEATURE_INDIVIDUAL(, char **argv)) |
305 | { | 305 | { |
306 | #ifdef __GLIBC__ | 306 | #ifdef __GLIBC__ |
307 | (*(int **)&bb_errno) = __errno_location(); | 307 | (*(int **)not_const_pp(&bb_errno)) = __errno_location(); |
308 | barrier(); | 308 | barrier(); |
309 | #endif | 309 | #endif |
310 | applet_name = applet; | 310 | applet_name = applet; |
diff --git a/libbb/lineedit.c b/libbb/lineedit.c index fbabc6c12..b1ec52b88 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c | |||
@@ -203,7 +203,7 @@ extern struct lineedit_statics *const lineedit_ptr_to_statics; | |||
203 | #define delbuf (S.delbuf ) | 203 | #define delbuf (S.delbuf ) |
204 | 204 | ||
205 | #define INIT_S() do { \ | 205 | #define INIT_S() do { \ |
206 | (*(struct lineedit_statics**)&lineedit_ptr_to_statics) = xzalloc(sizeof(S)); \ | 206 | (*(struct lineedit_statics**)not_const_pp(&lineedit_ptr_to_statics)) = xzalloc(sizeof(S)); \ |
207 | barrier(); \ | 207 | barrier(); \ |
208 | cmdedit_termw = 80; \ | 208 | cmdedit_termw = 80; \ |
209 | IF_USERNAME_OR_HOMEDIR(home_pwd_buf = (char*)null_str;) \ | 209 | IF_USERNAME_OR_HOMEDIR(home_pwd_buf = (char*)null_str;) \ |