Date: Fri, 30 Jan 2015 21:59:54 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277951 - head/sys/netgraph Message-ID: <201501302159.t0ULxsJZ098974@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Fri Jan 30 21:59:53 2015 New Revision: 277951 URL: https://svnweb.freebsd.org/changeset/base/277951 Log: Fix a bunch of -Wcast-qual warnings in netgraph's ng_parse.c, by using __DECONST. No functional change. MFC after: 3 days Modified: head/sys/netgraph/ng_parse.c Modified: head/sys/netgraph/ng_parse.c ============================================================================== --- head/sys/netgraph/ng_parse.c Fri Jan 30 21:22:18 2015 (r277950) +++ head/sys/netgraph/ng_parse.c Fri Jan 30 21:59:53 2015 (r277951) @@ -1122,7 +1122,7 @@ ng_bytearray_parse(const struct ng_parse struct ng_parse_type subtype; subtype = ng_parse_bytearray_subtype; - *(const void **)&subtype.private = type->info; + subtype.private = __DECONST(void *, type->info); return ng_array_parse(&subtype, s, off, start, buf, buflen); } } @@ -1134,7 +1134,7 @@ ng_bytearray_unparse(const struct ng_par struct ng_parse_type subtype; subtype = ng_parse_bytearray_subtype; - *(const void **)&subtype.private = type->info; + subtype.private = __DECONST(void *, type->info); return ng_array_unparse(&subtype, data, off, cbuf, cbuflen); } @@ -1145,7 +1145,7 @@ ng_bytearray_getDefault(const struct ng_ struct ng_parse_type subtype; subtype = ng_parse_bytearray_subtype; - *(const void **)&subtype.private = type->info; + subtype.private = __DECONST(void *, type->info); return ng_array_getDefault(&subtype, start, buf, buflen); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501302159.t0ULxsJZ098974>