DragonFly submit List (threaded) for 2006-01
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Netgraph warnings patch
Hi,
1) Fix lvalues assignment (obtained from FreeBSD)
Index: ether/ng_ether.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/netgraph/ether/ng_ether.c,v
retrieving revision 1.9
diff -u -r1.9 ng_ether.c
--- ether/ng_ether.c 14 Jan 2006 11:10:47 -0000 1.9
+++ ether/ng_ether.c 15 Jan 2006 23:38:24 -0000
@@ -67,7 +67,7 @@
#include "ng_ether.h"
#define IFP2AC(IFP) ((struct arpcom *)IFP)
-#define IFP2NG(ifp) ((struct ng_node *)((struct arpcom *)(ifp))->ac_netgraph)
+#define IFP2NG(ifp) (IFP2AC((ifp))->ac_netgraph)
/* Per-node private data */
struct private {
Index: netgraph/ng_parse.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/netgraph/netgraph/ng_parse.c,v
retrieving revision 1.6
diff -u -r1.6 ng_parse.c
--- netgraph/ng_parse.c 20 Feb 2005 12:49:34 -0000 1.6
+++ netgraph/ng_parse.c 15 Jan 2006 23:37:58 -0000
@@ -976,7 +976,7 @@
struct ng_parse_type subtype;
subtype = ng_parse_bytearray_subtype;
- (const void *)subtype.private = type->info;
+ *(const void **)&subtype.private = type->info;
return ng_array_parse(&subtype, s, off, start, buf, buflen);
}
}
@@ -988,7 +988,7 @@
struct ng_parse_type subtype;
subtype = ng_parse_bytearray_subtype;
- (const void *)subtype.private = type->info;
+ *(const void **)&subtype.private = type->info;
return ng_array_unparse(&subtype, data, off, cbuf, cbuflen);
}
@@ -999,7 +999,7 @@
struct ng_parse_type subtype;
subtype = ng_parse_bytearray_subtype;
- (const void *)subtype.private = type->info;
+ *(const void **)&subtype.private = type->info;
return ng_array_getDefault(&subtype, start, buf, buflen);
}
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]