From 4580c7f36b42e5ef8f054271fe3f12bc73cf7393 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 2 Feb 2023 20:21:38 +0000 Subject: please the compiler better ;-) --- generic/ttk/ttkDefaultTheme.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/generic/ttk/ttkDefaultTheme.c b/generic/ttk/ttkDefaultTheme.c index 7330356..ebca9fe 100644 --- a/generic/ttk/ttkDefaultTheme.c +++ b/generic/ttk/ttkDefaultTheme.c @@ -388,8 +388,8 @@ static const Ttk_ElementSpec FieldElementSpec = { typedef struct { int width; /* Width of each image */ int height; /* Height of each image */ - const char *const offDataPtr; - const char *const onDataPtr; + const char *offDataPtr; + const char *onDataPtr; const Ttk_StateTable *map; /* used to look up image index by state */ } IndicatorSpec; @@ -424,7 +424,7 @@ static const char *const checkbtnOnData = "\ \n\ "; -static IndicatorSpec checkbutton_spec = { +static const IndicatorSpec checkbutton_spec = { 16, 16, checkbtnOffData, checkbtnOnData, @@ -474,7 +474,7 @@ static const char *const radiobtnOnData = "\ \n\ "; -static IndicatorSpec radiobutton_spec = { +static const IndicatorSpec radiobutton_spec = { 16, 16, radiobtnOffData, radiobtnOnData, @@ -513,7 +513,7 @@ static void IndicatorElementSize( void *clientData, void *elementRecord, Tk_Window tkwin, int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr) { - IndicatorSpec *spec = (IndicatorSpec *)clientData; + const IndicatorSpec *spec = (const IndicatorSpec *)clientData; Tcl_Interp *interp = Tk_Interp(tkwin); const char *scalingPctPtr; double scalingFactor; @@ -561,7 +561,7 @@ static void IndicatorElementDraw( Tcl_Interp *interp = Tk_Interp(tkwin); const char *scalingPctPtr; double scalingFactor; - IndicatorSpec *spec = (IndicatorSpec *)clientData; + const IndicatorSpec *spec = (const IndicatorSpec *)clientData; int index; const char *svgDataPtr; @@ -1244,9 +1244,9 @@ MODULE_SCOPE int TtkAltTheme_Init(Tcl_Interp *interp) Ttk_RegisterElement(interp, theme, "border", &BorderElementSpec, NULL); Ttk_RegisterElement(interp, theme, "Checkbutton.indicator", - &IndicatorElementSpec, &checkbutton_spec); + &IndicatorElementSpec, (void *)&checkbutton_spec); Ttk_RegisterElement(interp, theme, "Radiobutton.indicator", - &IndicatorElementSpec, &radiobutton_spec); + &IndicatorElementSpec, (void *)&radiobutton_spec); Ttk_RegisterElement(interp, theme, "Menubutton.indicator", &MenubuttonArrowElementSpec, NULL); -- cgit v0.12