Making discarded-qualifiers a gcc error instead of warning?

Will Fiveash will.fiveash at oracle.com
Fri Sep 2 16:53:48 EDT 2016


On Fri, Sep 02, 2016 at 04:03:46PM -0400, Tom Yu wrote:
> Will Fiveash <will.fiveash at oracle.com> writes:
> 
> > ../../../../krb5-1.14.3/src/lib/krb5/krb/chpw.c: In function 'krb5int_mk_chpw_req':
> > ../../../../krb5-1.14.3/src/lib/krb5/krb/chpw.c:32:18: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
> >      clearpw.data = passwd;
> >                   ^
> > ../../../../krb5-1.14.3/src/lib/krb5/krb/chpw.c: In function 'krb5int_mk_setpw_req':
> > ../../../../krb5-1.14.3/src/lib/krb5/krb/chpw.c:305:23: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
> >      req.password.data = passwd;
> >                        ^
> > ../../../../../krb5-1.14.3/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.c: In function 'has_rootdse_ava':
> > ../../../../../krb5-1.14.3/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.c:135:14: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
> >      attrs[0] = attribute;
> >               ^
> 
> I think e534f688db29945e4efde425f62ce7dae4608f6f (on master) already
> fixed the chpw.c cases, and 66acc3b529f997f902bf11d3004ddc065d5bea9f
> (also on master) fixed the kdb_ldap.c case.  They're not currently
> marked for pullup to release branches, but I'm willing to consider doing
> so if they're not too difficult to back port.

Thanks for looking at that.  I don't think you need to worry about
backporting those cast fixes for us, we can just patch it if we need to
(still mulling over how/when we will go about making our build env.
stricter).  I am glad to see that y'all have been working towards
tightening up the build environment as that should make building MIT
krb5 code easier next time we update to newer MIT krb5 source.

-- 
Will Fiveash
Oracle Solaris Software Engineer


More information about the krbdev mailing list