diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2018-12-08 13:49:15 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-12-08 13:49:15 +0100 |
commit | 136fe9bede247d3273f5e82b5e856fa5c15a922c (patch) | |
tree | 72c105550fa30d42bfd8344a1550eacb7cc5dcb5 /libbb/lineedit.c | |
parent | 9f00a0fdb159432f1d7232253e2180d85e5eca32 (diff) | |
download | busybox-w32-136fe9bede247d3273f5e82b5e856fa5c15a922c.tar.gz busybox-w32-136fe9bede247d3273f5e82b5e856fa5c15a922c.tar.bz2 busybox-w32-136fe9bede247d3273f5e82b5e856fa5c15a922c.zip |
suppress gcc 8 aliasing warnings
function old new delta
sigprocmask_SIG_SETMASK - 16 +16
wait_for_child_or_signal 221 213 -8
dowait 432 424 -8
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb/lineedit.c')
-rw-r--r-- | libbb/lineedit.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c index b6fcd7af0..378f0900a 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c | |||
@@ -2309,6 +2309,16 @@ static int32_t reverse_i_search(int timeout) | |||
2309 | } | 2309 | } |
2310 | #endif | 2310 | #endif |
2311 | 2311 | ||
2312 | static void sigaction2(int sig, struct sigaction *act) | ||
2313 | { | ||
2314 | // Grr... gcc 8.1.1: | ||
2315 | // "passing argument 3 to restrict-qualified parameter aliases with argument 2" | ||
2316 | // dance around that... | ||
2317 | struct sigaction *oact FIX_ALIASING; | ||
2318 | oact = act; | ||
2319 | sigaction(sig, act, oact); | ||
2320 | } | ||
2321 | |||
2312 | /* maxsize must be >= 2. | 2322 | /* maxsize must be >= 2. |
2313 | * Returns: | 2323 | * Returns: |
2314 | * -1 on read errors or EOF, or on bare Ctrl-D, | 2324 | * -1 on read errors or EOF, or on bare Ctrl-D, |
@@ -2419,7 +2429,7 @@ int FAST_FUNC read_line_input(line_input_t *st, const char *prompt, char *comman | |||
2419 | /* Install window resize handler (NB: after *all* init is complete) */ | 2429 | /* Install window resize handler (NB: after *all* init is complete) */ |
2420 | S.SIGWINCH_handler.sa_handler = win_changed; | 2430 | S.SIGWINCH_handler.sa_handler = win_changed; |
2421 | S.SIGWINCH_handler.sa_flags = SA_RESTART; | 2431 | S.SIGWINCH_handler.sa_flags = SA_RESTART; |
2422 | sigaction(SIGWINCH, &S.SIGWINCH_handler, &S.SIGWINCH_handler); | 2432 | sigaction2(SIGWINCH, &S.SIGWINCH_handler); |
2423 | #endif | 2433 | #endif |
2424 | read_key_buffer[0] = 0; | 2434 | read_key_buffer[0] = 0; |
2425 | while (1) { | 2435 | while (1) { |