aboutsummaryrefslogtreecommitdiff
path: root/console-tools
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-02-04 15:00:15 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2010-02-04 15:00:15 +0100
commit98a4c7cf3d799ab953cb77e8b34597c73e3e7335 (patch)
tree2d9c07825697cd7c6e96647ff0992dce4d4a0115 /console-tools
parent1821d188ca674b42bf0f384b0c2332ff95701bba (diff)
downloadbusybox-w32-98a4c7cf3d799ab953cb77e8b34597c73e3e7335.tar.gz
busybox-w32-98a4c7cf3d799ab953cb77e8b34597c73e3e7335.tar.bz2
busybox-w32-98a4c7cf3d799ab953cb77e8b34597c73e3e7335.zip
*: suppress ~60% of "aliased warnings" on gcc-4.4.1
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'console-tools')
-rw-r--r--console-tools/resize.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/console-tools/resize.c b/console-tools/resize.c
index 4504cc85d..828b5bb42 100644
--- a/console-tools/resize.c
+++ b/console-tools/resize.c
@@ -11,12 +11,12 @@
11 11
12#define ESC "\033" 12#define ESC "\033"
13 13
14#define old_termios (*(struct termios*)&bb_common_bufsiz1) 14#define old_termios_p ((struct termios*)&bb_common_bufsiz1)
15 15
16static void 16static void
17onintr(int sig UNUSED_PARAM) 17onintr(int sig UNUSED_PARAM)
18{ 18{
19 tcsetattr(STDERR_FILENO, TCSANOW, &old_termios); 19 tcsetattr(STDERR_FILENO, TCSANOW, old_termios_p);
20 exit(EXIT_FAILURE); 20 exit(EXIT_FAILURE);
21} 21}
22 22
@@ -33,8 +33,8 @@ int resize_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
33 * and operate on it - should we do the same? 33 * and operate on it - should we do the same?
34 */ 34 */
35 35
36 tcgetattr(STDERR_FILENO, &old_termios); /* fiddle echo */ 36 tcgetattr(STDERR_FILENO, old_termios_p); /* fiddle echo */
37 new = old_termios; 37 memcpy(&new, old_termios_p, sizeof(new));
38 new.c_cflag |= (CLOCAL | CREAD); 38 new.c_cflag |= (CLOCAL | CREAD);
39 new.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG); 39 new.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG);
40 bb_signals(0 40 bb_signals(0
@@ -61,7 +61,7 @@ int resize_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
61 * (gotten via TIOCGWINSZ) and recomputing *pixel values */ 61 * (gotten via TIOCGWINSZ) and recomputing *pixel values */
62 ret = ioctl(STDERR_FILENO, TIOCSWINSZ, &w); 62 ret = ioctl(STDERR_FILENO, TIOCSWINSZ, &w);
63 63
64 tcsetattr(STDERR_FILENO, TCSANOW, &old_termios); 64 tcsetattr(STDERR_FILENO, TCSANOW, old_termios_p);
65 65
66 if (ENABLE_FEATURE_RESIZE_PRINT) 66 if (ENABLE_FEATURE_RESIZE_PRINT)
67 printf("COLUMNS=%d;LINES=%d;export COLUMNS LINES;\n", 67 printf("COLUMNS=%d;LINES=%d;export COLUMNS LINES;\n",