misc/77841: Cast away const in getpublickey()

Kevin M. Kilbride kmk at ssl.org
Mon Feb 21 10:00:32 GMT 2005

>Number:         77841
>Category:       misc
>Synopsis:       Cast away const in getpublickey()
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 21 10:00:31 GMT 2005
>Originator:     Kevin M. Kilbride
>Release:        5.3-STABLE
Sapient Systems Laboratories
FreeBSD devel.localnet 5.3-STABLE FreeBSD 5.3-STABLE #0: Sun Feb 20 21:44:50 PST 2005     chandra at devel.localnet:/usr/src/sys/i386/compile/DEVIL  i386
      getpublickey() declared with const formal parameter, but parameter is simply passed immediately through a chain of functions that discard const attribute of parameter. Calling function should explicitly discard const to avoid compilation errors in buildworld using CFLAGS overrides.
      --- lib/libc/rpc/getpublickey.c.orig    Mon Feb 21 01:50:26 2005
+++ lib/libc/rpc/getpublickey.c Mon Feb 21 01:50:38 2005
@@ -174,5 +174,5 @@
        if (__getpublickey_LOCAL != NULL)
                return(__getpublickey_LOCAL(netname, publickey));
-               return(__getpublickey_real(netname, publickey));
+               return(__getpublickey_real((char *)netname, publickey));

More information about the freebsd-bugs mailing list