Un-const as necessary to silence compiler warnings

This commit is contained in:
Asanka C. Herath
2010-11-18 20:44:40 -05:00
parent d11917211b
commit 880d728e02
10 changed files with 17 additions and 16 deletions

View File

@@ -733,11 +733,11 @@ static struct getargs args[] = {
{ "keytab", 'k', arg_string, &keytab_str,
"keytab to get authentication from", "kspec" },
{ "database", 'd', arg_string, &database, "database", "file"},
{ "slave-stats-file", 0, arg_string, &slave_stats_file,
{ "slave-stats-file", 0, arg_string, rk_UNCONST(&slave_stats_file),
"file for slave status information", "file"},
{ "time-missing", 0, arg_string, &slave_time_missing,
{ "time-missing", 0, arg_string, rk_UNCONST(&slave_time_missing),
"time before slave is polled for presence", "time"},
{ "time-gone", 0, arg_string, &slave_time_gone,
{ "time-gone", 0, arg_string, rk_UNCONST(&slave_time_gone),
"time of inactivity after which a slave is considered gone", "time"},
{ "port", 0, arg_string, &port_str,
"port ipropd will listen to", "port"},
@@ -745,7 +745,7 @@ static struct getargs args[] = {
{ "detach", 0, arg_flag, &detach_from_console,
"detach from console" },
#endif
{ "hostname", 0, arg_string, &master_hostname,
{ "hostname", 0, arg_string, rk_UNCONST(&master_hostname),
"hostname of master (if not same as hostname)", "hostname" },
{ "version", 0, arg_flag, &version_flag },
{ "help", 0, arg_flag, &help_flag }

View File

@@ -472,7 +472,7 @@ static struct getargs args[] = {
{ "detach", 0, arg_flag, &detach_from_console,
"detach from console" },
#endif
{ "hostname", 0, arg_string, &slave_str,
{ "hostname", 0, arg_string, rk_UNCONST(&slave_str),
"hostname of slave (if not same as hostname)", "hostname" },
{ "version", 0, arg_flag, &version_flag },
{ "help", 0, arg_flag, &help_flag }

View File

@@ -134,7 +134,7 @@ krb5_cc_register(krb5_context context,
}
}
if(i == context->num_cc_ops) {
const krb5_cc_ops **o = realloc(context->cc_ops,
const krb5_cc_ops **o = realloc(rk_UNCONST(context->cc_ops),
(context->num_cc_ops + 1) *
sizeof(context->cc_ops[0]));
if(o == NULL) {

View File

@@ -269,7 +269,7 @@ cc_ops_copy(krb5_context context, const krb5_context src_context)
return KRB5_CC_NOMEM;
}
memcpy(cc_ops, src_context->cc_ops,
memcpy(rk_UNCONST(cc_ops), src_context->cc_ops,
sizeof(cc_ops[0]) * src_context->num_cc_ops);
context->cc_ops = cc_ops;
context->num_cc_ops = src_context->num_cc_ops;
@@ -559,7 +559,7 @@ krb5_free_context(krb5_context context)
krb5_free_host_realm (context, context->default_realms);
krb5_config_file_free (context, context->cf);
free_error_table (context->et_list);
free(context->cc_ops);
free(rk_UNCONST(context->cc_ops));
free(context->kt_types);
krb5_clear_error_message(context);
if(context->warn_dest != NULL)