aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2018-12-08 13:49:15 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2018-12-08 13:49:15 +0100
commit136fe9bede247d3273f5e82b5e856fa5c15a922c (patch)
tree72c105550fa30d42bfd8344a1550eacb7cc5dcb5 /libbb
parent9f00a0fdb159432f1d7232253e2180d85e5eca32 (diff)
downloadbusybox-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')
-rw-r--r--libbb/lineedit.c12
-rw-r--r--libbb/signals.c10
2 files changed, 21 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
2312static 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) {
diff --git a/libbb/signals.c b/libbb/signals.c
index 3f589321c..5a1544db7 100644
--- a/libbb/signals.c
+++ b/libbb/signals.c
@@ -31,6 +31,16 @@ int FAST_FUNC sigprocmask_allsigs(int how)
31 return sigprocmask(how, &set, NULL); 31 return sigprocmask(how, &set, NULL);
32} 32}
33 33
34int FAST_FUNC sigprocmask_SIG_SETMASK(sigset_t *set)
35{
36 // Grr... gcc 8.1.1:
37 // "passing argument 3 to restrict-qualified parameter aliases with argument 2"
38 // dance around that...
39 sigset_t *oset FIX_ALIASING;
40 oset = set;
41 return sigprocmask(SIG_SETMASK, set, oset);
42}
43
34void FAST_FUNC bb_signals(int sigs, void (*f)(int)) 44void FAST_FUNC bb_signals(int sigs, void (*f)(int))
35{ 45{
36 int sig_no = 0; 46 int sig_no = 0;