From 57a4bfc75970e01a1e95f0807f090c70945e9f1b Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 11 Nov 2007 20:23:45 +0100 Subject: [PATCH] Avoid some gcc warnings. --- score.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/score.c b/score.c index 58d219ab..7d3b0246 100644 --- a/score.c +++ b/score.c @@ -132,7 +132,7 @@ int score_add(const struct osl_row *aft_row, long score) assert(aft_row); size = score_table_desc.column_descriptions[SCORECOL_AFT_ROW].data_size; - score_objs[SCORECOL_AFT_ROW].data = aft_row; + score_objs[SCORECOL_AFT_ROW].data = (struct osl_row *)aft_row; score_objs[SCORECOL_AFT_ROW].size = size; size = score_table_desc.column_descriptions[SCORECOL_SCORE].data_size; @@ -178,7 +178,8 @@ int score_update(const struct osl_row *aft_row, long percent) struct osl_row *row; long new_score; unsigned n, new_pos; - struct osl_object obj = {.data = aft_row, .size = sizeof(aft_row)}; + struct osl_object obj = {.data = (struct osl_row *)aft_row, + .size = sizeof(aft_row)}; int ret = osl_get_row(score_table, SCORECOL_AFT_ROW, &obj, &row); if (ret < 0) @@ -226,7 +227,8 @@ int get_score_and_aft_row(struct osl_row *score_row, long *score, static int get_score_row_from_aft_row(const struct osl_row *aft_row, struct osl_row **score_row) { - struct osl_object obj = {.data = aft_row, .size = sizeof(aft_row)}; + struct osl_object obj = {.data = (struct osl_row *)aft_row, + .size = sizeof(aft_row)}; return osl_get_row(score_table, SCORECOL_AFT_ROW, &obj, score_row); } -- 2.39.5