Add wavemon from #4154
[openwrt/svn-archive/archive.git] / net / wavemon / patches / 001-gcc_fixes.patch
1 diff -ur wavemon-0.4.0b-orig/conf.c wavemon-0.4.0b/conf.c
2 --- wavemon-0.4.0b-orig/conf.c 2005-07-08 23:49:09.000000000 -0400
3 +++ wavemon-0.4.0b/conf.c 2005-07-08 23:48:05.000000000 -0400
4 @@ -409,8 +409,8 @@
5 fatal_error("parse error in %s, line %d: '%s' is not a valid argument here", cfname, lnum, rv);
6 }
7 break;
8 - case t_sep: /* gcc -Wall sucks */
9 - case t_func:
10 + case t_sep: ; /* gcc -Wall sucks */
11 + case t_func: ;
12 }
13 }
14 }
15 @@ -481,7 +481,7 @@
16 break;
17 case t_listval: sprintf(rv, "%s", (char *)ci->v);
18 case t_sep: break;
19 - case t_func:
20 + case t_func: ;
21 }
22
23 add = 1;
24 diff -ur wavemon-0.4.0b-orig/conf_scr.c wavemon-0.4.0b/conf_scr.c
25 --- wavemon-0.4.0b-orig/conf_scr.c 2005-07-08 23:49:09.000000000 -0400
26 +++ wavemon-0.4.0b/conf_scr.c 2005-07-08 23:48:05.000000000 -0400
27 @@ -63,7 +63,7 @@
28 case t_listval: strncpy(s, (char *)item->v, 32);
29 break;
30 case t_sep: /* gcc -Wall sucks */
31 - case t_func:
32 + case t_func: ;
33 }
34
35 if (!item->unit) {
36 @@ -135,8 +135,8 @@
37 }
38 strncpy((char *)item->v, ll_get(item->list, tmp), 32);
39 break;
40 - case t_sep: /* gcc -Wall sucks */
41 - case t_func:
42 + case t_sep: ; /* gcc -Wall sucks */
43 + case t_func: ;
44 }
45 }
46
47 diff -ur wavemon-0.4.0b-orig/llist.c wavemon-0.4.0b/llist.c
48 --- wavemon-0.4.0b-orig/llist.c 2005-07-08 23:46:09.000000000 -0400
49 +++ wavemon-0.4.0b/llist.c 2005-07-08 23:47:28.000000000 -0400
50 @@ -352,7 +352,7 @@
51 *((int *)l->e) = va_arg(*ap, int);
52 break;
53 case 's': l->e = (void *)malloc(sizeof(char *));
54 - (char *)l->e = strdup(va_arg(*ap, char *));
55 + l->e = strdup(va_arg(*ap, char *));
56 break;
57 case 'f': l->e = (void *)malloc(sizeof(double));
58 *((double *)l->e) = va_arg(*ap, double);
59 diff -ur wavemon-0.4.0b-orig/wavemon.c wavemon-0.4.0b/wavemon.c
60 --- wavemon-0.4.0b-orig/wavemon.c 2005-07-08 23:49:09.000000000 -0400
61 +++ wavemon-0.4.0b/wavemon.c 2005-07-08 23:48:05.000000000 -0400
62 @@ -170,7 +170,7 @@
63
64 if (conf.dump == 1) {
65 dump_parameters(&conf);
66 - exit();
67 + exit(0);
68 }
69
70 /* initialize the ncurses interface */