Making discarded-qualifiers a gcc error instead of warning?
Will Fiveash
will.fiveash at oracle.com
Thu Sep 1 18:56:15 EDT 2016
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
More information about the krbdev
mailing list