CURRENT (r253984) buildworld fails: contrib/bind9/bin/dig/dighost.c:4340:27: error: passing 'const char *' to parameter of type 'void *' discards qualifiers

2013-08-06 Thread O. Hartmann
/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); [...] signature.asc

Re: const char *

1999-02-21 Thread Matthew Dillon
: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

Re: const char *

1999-02-21 Thread Bruce Evans
../../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 char* desc; /* driver specific description

Re: const char *

1999-02-21 Thread John Polstra
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 those cases where it made sense to cast away const (e.g., dealing with bad but standard interfaces). The above is more

const char *

1999-02-20 Thread Nick Hibma
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* desc

Re: const char *

1999-02-20 Thread John Polstra
/ukbd.c:373: warning: cast discards `const' 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); ... Anyone