[19471] in Kerberos_V5_Development
Making discarded-qualifiers a gcc error instead of warning?
daemon@ATHENA.MIT.EDU (Will Fiveash)
Thu Sep 1 18:56:33 2016
Date: Thu, 1 Sep 2016 17:56:15 -0500
From: Will Fiveash <will.fiveash@oracle.com>
To: MIT Kerberos Dev List <krbdev@mit.edu>
Message-ID: <20160901225615.GA14221@oracle.com>
Mail-Followup-To: MIT Kerberos Dev List <krbdev@MIT.EDU>
MIME-Version: 1.0
Content-Disposition: inline
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: krbdev-bounces@mit.edu
I'm in the process of making the Solaris compile of MIT krb more strict
and one thing I've noticed in the MIT build environment is that
-Wdiscarded-qualifiers is being treated by gcc as a warning, not an
error. Given there are only three of these types of warnings in the
entire 1.14.3 code base I was wondering if y'all would consider making
discarded-qualifiers an error and adding a cast to the three lines in
the source files that need it?
Here are the actual warnings:
../../../../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;
^
--
Will Fiveash
Oracle Solaris Software Engineer
_______________________________________________
krbdev mailing list krbdev@mit.edu
https://mailman.mit.edu/mailman/listinfo/krbdev