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

const char *tsptype[TSPTYPENUMBER] in "protocols/timed.h" ?

2001-11-22 Thread Sergey A. Osokin
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

Re: const char *

1999-02-21 Thread John Polstra
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

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

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-20 Thread John Polstra
' 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); ...

const char *

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