Fix a bunch of -Wcast-qual warnings in netgraph's ng_parse.c, by using
__DECONST. No functional change. MFC after: 3 days
This commit is contained in:
parent
04e98a3724
commit
1bb25a82ab
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=277951
@ -1122,7 +1122,7 @@ ng_bytearray_parse(const struct ng_parse_type *type,
|
||||
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_parse_type *type,
|
||||
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_parse_type *type,
|
||||
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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user