From af7169b4a70eb3f60555ced17a40780f70aaaa5c Mon Sep 17 00:00:00 2001 From: Denys Vlasenko <vda.linux@googlemail.com> Date: Fri, 25 Oct 2019 12:12:22 +0200 Subject: 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> --- libbb/lineedit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libbb/lineedit.c') 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; #define delbuf (S.delbuf ) #define INIT_S() do { \ - (*(struct lineedit_statics**)&lineedit_ptr_to_statics) = xzalloc(sizeof(S)); \ + (*(struct lineedit_statics**)not_const_pp(&lineedit_ptr_to_statics)) = xzalloc(sizeof(S)); \ barrier(); \ cmdedit_termw = 80; \ IF_USERNAME_OR_HOMEDIR(home_pwd_buf = (char*)null_str;) \ -- cgit v1.2.3-55-g6feb