From a00305f0be373391d51675a94c8345e3506891c3 Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Tue, 1 May 2012 01:19:54 +0400 Subject: [PATCH] Avoid of incompatible types in static vtables. --- ColoredSquare.c | 10 +++++----- Square.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ColoredSquare.c b/ColoredSquare.c index 76903da..a34283f 100644 --- a/ColoredSquare.c +++ b/ColoredSquare.c @@ -71,11 +71,11 @@ ColoredSquare* ColoredSquare_new (double a, int color) { static ColoredSquare_interface vtable = { - ColoredSquare_clone, - Square_destroy, - ColoredSquare_type, - ColoredSquare_draw, - Square_area, + (void* (*) (void *)) ColoredSquare_clone, + (void (*) (void *)) Square_destroy, + (const char* (*) (Figure *)) ColoredSquare_type, + (void (*) (Figure *)) ColoredSquare_draw, + (double (*) (Figure *)) Square_area, Square_resize, Square_diag_length, ColoredSquare_set_color diff --git a/Square.c b/Square.c index abbdd9e..90e6b3a 100644 --- a/Square.c +++ b/Square.c @@ -102,11 +102,11 @@ Square* Square_new (double a) { static Square_interface vtable = { - Square_clone, - Square_destroy, - Square_type, - Square_draw, - Square_area, + (void* (*) (void *)) Square_clone, + (void (*) (void *)) Square_destroy, + (const char* (*) (Figure *)) Square_type, + (void (*) (Figure *)) Square_draw, + (double (*) (Figure *)) Square_area, Square_resize, Square_diag_length };