And a patch that removes the 2 warnings that occur during compile of
lxdialog:
menubox.c: In function `print_item':
menubox.c:63: warning: unused variable `i'
textbox.c: In function `print_line':
textbox.c:454: warning: unused variable `i'
They were simply removed by defining a scope '{' '}' for the variable 'i'
inside the define were they are used, and then removing them from the
function initializer.
/David Weinehall
Project MCA - mcalinux@acc.umu.se
>--------------------------------------------------------------------<
> <
> *****.. Tao of TRIAD *****.. <
> ****......... ______________ ****......... <
> ****.....***... ****.....***... <
> ****......***.... David Weinehall ****......***.... <
> ******........... V Varmvattnet 63 ******........... <
> ***********...... S - 922 67 TAVELSJO ***********...... <
> ****...******.... SWEDEN ****...******.... <
> ***...*****.... ***...*****.... <
> *********.... Tel # : +46(0)90 - 604 10 *********.... <
> **..... E-mail: tao@acc.umu.se **..... <
> Home-page: http://www.acc.umu.se/~tao/ <
>--------------------------------------------------------------------<
--- linux-2.1.125/net/Makefile Mon Jul 27 08:35:57 1998
+++ linux-2.1.125/net/Makefile Sun Oct 18 00:09:48 1998
@@ -168,7 +168,9 @@
M_OBJS :=
ifeq ($(CONFIG_SYSCTL),y)
+ifeq ($(CONFIG_NET),y)
L_OBJS += sysctl_net.o
+endif
endif
include $(TOPDIR)/Rules.make
--- linux-2.1.125/net/core/Makefile Tue Apr 28 20:10:10 1998
+++ linux-2.1.125/net/core/Makefile Sun Oct 18 00:29:53 1998
@@ -12,7 +12,9 @@
O_OBJS := sock.o skbuff.o iovec.o datagram.o scm.o
ifeq ($(CONFIG_SYSCTL),y)
+ifeq ($(CONFIG_NET),y)
O_OBJS += sysctl_net_core.o
+endif
endif
ifdef CONFIG_FILTER
--- linux-2.1.125/kernel/sysctl.c Wed Sep 30 19:15:03 1998
+++ linux-2.1.125/kernel/sysctl.c Sat Oct 17 23:51:29 1998
@@ -72,7 +72,9 @@
static ctl_table kern_table[];
static ctl_table vm_table[];
+#ifdef CONFIG_NET
extern ctl_table net_table[];
+#endif
static ctl_table proc_table[];
static ctl_table fs_table[];
static ctl_table debug_table[];
@@ -136,7 +138,9 @@
static ctl_table root_table[] = {
{CTL_KERN, "kernel", NULL, 0, 0555, kern_table},
{CTL_VM, "vm", NULL, 0, 0555, vm_table},
+#ifdef CONFIG_NET
{CTL_NET, "net", NULL, 0, 0555, net_table},
+#endif
{CTL_PROC, "proc", NULL, 0, 0555, proc_table},
{CTL_FS, "fs", NULL, 0, 0555, fs_table},
{CTL_DEBUG, "debug", NULL, 0, 0555, debug_table},
--- linux-2.1.125/scripts/lxdialog/menubox.c Tue Oct 6 18:39:44 1998
+++ linux-2.1.125/scripts/lxdialog/menubox.c Mon Oct 19 08:24:00 1998
@@ -60,7 +60,7 @@
static void
print_item (WINDOW * win, const char *item, int choice, int selected, int hotkey)
{
- int i, j;
+ int j;
char menu_item[menu_width+1];
strncpy(menu_item, item, menu_width);
@@ -71,8 +71,12 @@
wattrset (win, menubox_attr);
wmove (win, choice, 0);
#if OLD_NCURSES
- for (i = 0; i < menu_width; i++)
- waddch (win, ' ');
+ {
+ int i;
+
+ for (i = 0; i < menu_width; i++)
+ waddch (win, ' ');
+ }
#else
wclrtoeol(win);
#endif
--- linux-2.1.125/scripts/lxdialog/textbox.c Tue Oct 6 18:39:44 1998
+++ linux-2.1.125/scripts/lxdialog/textbox.c Mon Oct 19 08:23:19 1998
@@ -451,7 +451,7 @@
static void
print_line (WINDOW * win, int row, int width)
{
- int i, y, x;
+ int y, x;
char *line;
line = get_line ();
@@ -463,8 +463,12 @@
getyx (win, y, x);
/* Clear 'residue' of previous line */
#if OLD_NCURSES
- for (i = 0; i < width - x; i++)
- waddch (win, ' ');
+ {
+ int i;
+
+ for (i = 0; i < width - x; i++)
+ waddch (win, ' ');
+ }
#else
wclrtoeol(win);
#endif
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/