/perform.c --- usr.bin.all__D
--- /usr/src/usr.bin/dig/../../contrib/bind9/bin/dig/dighost.c:4340:27:
error: passing 'const char *' to parameter of type 'void *' discards
qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
isc_buffer_init(&buffer, str, len
Hello, hackers.
What do you think about change the type of tsptype in
src/include/protocols/timed.h from (char *)
to (const char *) ?
$ grep -r protocols/timed.h /usr/src
/usr/src/bin/date/netdate.c:#include
/usr/src/usr.sbin/timed/timed/byteorder.c: * messages. Protocol is defined in
/usr
licit casts which
change _only_ the constness. For example, casting from "const char
*" to "char *" explicitly would be OK. But casting from, say, "const
char *" to "void *" would still produce a warning. This would make it
possible to get rid of the warnings in
>../../dev/usb/ukbd.c: In function `ukbd_detach':
>../../dev/usb/ukbd.c:373: warning: cast discards `const' from pointer
>target type
>...
>It is a consequence of the following type definition:
>
>(sys/bus_private.h)
>struct device {
>...
>const
:don't think there's any way to get rid of the warning without changing
:the declarations.
:
:In my opinion, the use of "-Wcast-qual" is bogus. Often the whole
:point of a cast is to remove a qualifier such as const. It's one
:thing to warn when that's done implicitly, and quite another thing to
' from pointer
> target type
>
> produced by the following two lines in the USB code:
>
> (dev/usb/ukbd.c)
> ukbd_detach(device_t self)
> {
> ...
> const char *devinfo = device_get_desc(self);
> ...
> free((void *)devinfo, M_USB);
...
o lines in the USB code:
(dev/usb/ukbd.c)
ukbd_detach(device_t self)
{
...
const char *devinfo = device_get_desc(self);
...
free((void *)devinfo, M_USB);
It is a consequence of the following type definition:
(sys/bus_private.h)
struct device {
...
const char*