Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Feb 2015 07:59:34 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r278140 - in stable: 10/sys/netgraph 9/sys/netgraph
Message-ID:  <201502030759.t137xYcl094971@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Tue Feb  3 07:59:33 2015
New Revision: 278140
URL: https://svnweb.freebsd.org/changeset/base/278140

Log:
  MFC r277951:
  
  Fix a bunch of -Wcast-qual warnings in netgraph's ng_parse.c, by using
  __DECONST.  No functional change.

Modified:
  stable/9/sys/netgraph/ng_parse.c
Directory Properties:
  stable/9/sys/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/sys/netgraph/ng_parse.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/9/sys/netgraph/ng_parse.c
==============================================================================
--- stable/9/sys/netgraph/ng_parse.c	Tue Feb  3 06:22:46 2015	(r278139)
+++ stable/9/sys/netgraph/ng_parse.c	Tue Feb  3 07:59:33 2015	(r278140)
@@ -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?201502030759.t137xYcl094971>