Use cast macros
[pspp-builds.git] / src / language / stats / wilcoxon.c
index e917f7ba641c413722d3f30f81ff37e2ddc1ab09..268296d7e6ee404f2a6657d7970ec385628ff05e 100644 (file)
@@ -79,7 +79,7 @@ wilcoxon_execute (const struct dataset *ds,
   int i;
   bool warn = true;
   const struct dictionary *dict = dataset_dict (ds);
-  const struct two_sample_test *t2s = (struct two_sample_test *) test;
+  const struct two_sample_test *t2s = UP_CAST (test, const struct two_sample_test, parent);
 
   struct wilcoxon_state *ws = xcalloc (sizeof (*ws), t2s->n_pairs);
   const struct variable *weight = dict_get_weight (dict);