X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fvariable.c;h=05edc57e2db85a3c02df4fbe3a16a6747d92c4bc;hb=507ef4ef1ad945accdbc86e97deefc1b001d266e;hp=d1e308640d05268df79f8639848cef04c618ba23;hpb=8f04b0ced35a66cfdebefbcb53c81979add36ca3;p=pspp-builds.git diff --git a/src/data/variable.c b/src/data/variable.c index d1e30864..05edc57e 100644 --- a/src/data/variable.c +++ b/src/data/variable.c @@ -957,7 +957,7 @@ void * var_attach_aux (const struct variable *v_, void *aux, void (*aux_dtor) (struct variable *)) { - struct variable *v = (struct variable *) v_ ; /* cast away const */ + struct variable *v = CONST_CAST (struct variable *, v_); assert (v->aux == NULL); assert (aux != NULL); v->aux = aux; @@ -1015,7 +1015,7 @@ var_get_obs_vals (const struct variable *v) void var_set_obs_vals (const struct variable *v_, struct cat_vals *cat_vals) { - struct variable *v = (struct variable *) v_ ; /* cast away const */ + struct variable *v = CONST_CAST (struct variable *, v_ ); cat_stored_values_destroy (v->obs_vals); v->obs_vals = cat_vals; } @@ -1035,7 +1035,7 @@ var_has_obs_vals (const struct variable *v) struct attrset * var_get_attributes (const struct variable *v) { - return (struct attrset *) &v->attributes; + return CONST_CAST (struct attrset *, &v->attributes); } /* Replaces variable V's attributes set by a copy of ATTRS. */