diff options
-rw-r--r-- | doc/SetOptions.3 | 4 | ||||
-rw-r--r-- | generic/tkCanvLine.c | 2 | ||||
-rw-r--r-- | generic/tkPanedWindow.c | 2 | ||||
-rw-r--r-- | generic/tkSelect.c | 2 | ||||
-rw-r--r-- | generic/ttk/ttkDefaultTheme.c | 8 | ||||
-rw-r--r-- | generic/ttk/ttkElements.c | 2 | ||||
-rw-r--r-- | generic/ttk/ttkNotebook.c | 2 | ||||
-rw-r--r-- | generic/ttk/ttkPanedwindow.c | 6 | ||||
-rw-r--r-- | win/ttkWinTheme.c | 4 |
9 files changed, 16 insertions, 16 deletions
diff --git a/doc/SetOptions.3 b/doc/SetOptions.3 index 6a70d9f..38838c1 100644 --- a/doc/SetOptions.3 +++ b/doc/SetOptions.3 @@ -619,9 +619,9 @@ The \fIgetProc\fR procedure is invoked by \fBTk_GetOptionValue\fR and internal representation of an option. The \fIclientData\fR argument is a copy of the \fIclientData\fR field in the Tk_ObjCustomOption structure. \fITkwin\fR is a copy of the \fItkwin\fR argument to -\fBTk_GetOptionValue\fR or \fBTk_GetOptionInfo\fR. \fIrecordPtr\fR +\fBTk_GetOptionValue\fR or \fBTk_GetOptionInfo\fR. \fIRecordPtr\fR is a pointer to the beginning of the widget record to query. -\fIinternalOffset\fR is the offset in bytes from the beginning of the +\fIInternalOffset\fR is the offset in bytes from the beginning of the widget record to the location where the internal representation of the option value is stored. \fIGetProc\fR must return a pointer to a Tcl_Obj representing the value of the option. diff --git a/generic/tkCanvLine.c b/generic/tkCanvLine.c index d0664f8..e35cbd9 100644 --- a/generic/tkCanvLine.c +++ b/generic/tkCanvLine.c @@ -1889,7 +1889,7 @@ ParseArrowShape( int argc; const char **argv = NULL; - if (offset != offsetof(LineItem, arrowShapeA)) { + if ((size_t)offset != offsetof(LineItem, arrowShapeA)) { Tcl_Panic("ParseArrowShape received bogus offset"); } diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c index 05b9715..967d322 100644 --- a/generic/tkPanedWindow.c +++ b/generic/tkPanedWindow.c @@ -2400,7 +2400,7 @@ GetSticky( int internalOffset) /* Offset within *recordPtr containing the * sticky value. */ { - int sticky = *(int *)((char *)recordPtr + internalOffset); + int sticky = *(int *)(recordPtr + internalOffset); char buffer[5]; char *p = &buffer[0]; diff --git a/generic/tkSelect.c b/generic/tkSelect.c index e97369f..513cf75 100644 --- a/generic/tkSelect.c +++ b/generic/tkSelect.c @@ -190,7 +190,7 @@ Tk_CreateSelHandler( * should make a copy for this selPtr. */ - unsigned cmdInfoLen = offsetof(CommandInfo, command) + 1 + + size_t cmdInfoLen = offsetof(CommandInfo, command) + 1 + ((CommandInfo *)clientData)->cmdLength; selPtr->clientData = ckalloc(cmdInfoLen); diff --git a/generic/ttk/ttkDefaultTheme.c b/generic/ttk/ttkDefaultTheme.c index 0b46db0..9fbcd02 100644 --- a/generic/ttk/ttkDefaultTheme.c +++ b/generic/ttk/ttkDefaultTheme.c @@ -253,7 +253,7 @@ static Ttk_ElementOptionSpec BorderElementOptions[] = { offsetof(BorderElement,borderColorObj), "black" }, { "-default", TK_OPTION_ANY, offsetof(BorderElement,defaultStateObj), "disabled" }, - { "-borderwidth",TK_OPTION_PIXELS,offsetof(BorderElement,borderWidthObj), + { "-borderwidth",TK_OPTION_PIXELS, offsetof(BorderElement,borderWidthObj), STRINGIFY(BORDERWIDTH) }, { "-relief", TK_OPTION_RELIEF, offsetof(BorderElement,reliefObj), "flat" }, @@ -909,8 +909,8 @@ static Ttk_ElementOptionSpec ThumbElementOptions[] = { DEFAULT_BACKGROUND }, { "-bordercolor", TK_OPTION_COLOR, offsetof(ThumbElement,borderColorObj), "black" }, - { "-relief", TK_OPTION_RELIEF,offsetof(ThumbElement,reliefObj),"raised" }, - { "-orient", TK_OPTION_ANY,offsetof(ThumbElement,orientObj),"horizontal"}, + { "-relief", TK_OPTION_RELIEF, offsetof(ThumbElement,reliefObj),"raised" }, + { "-orient", TK_OPTION_ANY, offsetof(ThumbElement,orientObj),"horizontal"}, { NULL, 0, 0, NULL } }; @@ -988,7 +988,7 @@ typedef struct { static Ttk_ElementOptionSpec SliderElementOptions[] = { { "-sliderlength", TK_OPTION_PIXELS, offsetof(SliderElement,lengthObj), "15" }, - { "-sliderthickness",TK_OPTION_PIXELS,offsetof(SliderElement,thicknessObj), + { "-sliderthickness",TK_OPTION_PIXELS, offsetof(SliderElement,thicknessObj), "15" }, { "-sliderrelief", TK_OPTION_RELIEF, offsetof(SliderElement,reliefObj), "raised" }, diff --git a/generic/ttk/ttkElements.c b/generic/ttk/ttkElements.c index 7e12836..b6bc1fd 100644 --- a/generic/ttk/ttkElements.c +++ b/generic/ttk/ttkElements.c @@ -911,7 +911,7 @@ typedef struct { static Ttk_ElementOptionSpec SliderElementOptions[] = { { "-sliderlength", TK_OPTION_PIXELS, offsetof(SliderElement,lengthObj), "30" }, - { "-sliderthickness",TK_OPTION_PIXELS,offsetof(SliderElement,thicknessObj), + { "-sliderthickness",TK_OPTION_PIXELS, offsetof(SliderElement,thicknessObj), "15" }, { "-sliderrelief", TK_OPTION_RELIEF, offsetof(SliderElement,reliefObj), "raised" }, diff --git a/generic/ttk/ttkNotebook.c b/generic/ttk/ttkNotebook.c index e0ef134..159a88d 100644 --- a/generic/ttk/ttkNotebook.c +++ b/generic/ttk/ttkNotebook.c @@ -58,7 +58,7 @@ typedef struct static Tk_OptionSpec TabOptionSpecs[] = { {TK_OPTION_STRING_TABLE, "-state", "", "", - "normal", -1,offsetof(Tab,state), + "normal", -1, offsetof(Tab,state), 0,(ClientData)TabStateStrings,0 }, {TK_OPTION_STRING, "-text", "text", "Text", "", offsetof(Tab,textObj), -1, 0,0,GEOMETRY_CHANGED }, diff --git a/generic/ttk/ttkPanedwindow.c b/generic/ttk/ttkPanedwindow.c index 90e454e..1b6ff3d 100644 --- a/generic/ttk/ttkPanedwindow.c +++ b/generic/ttk/ttkPanedwindow.c @@ -79,10 +79,10 @@ static Tk_OptionSpec PanedOptionSpecs[] = { offsetof(Paned,paned.orientObj), offsetof(Paned,paned.orient), 0,(ClientData)ttkOrientStrings,READONLY_OPTION|STYLE_CHANGED }, {TK_OPTION_INT, "-width", "width", "Width", "0", - -1,offsetof(Paned,paned.width), + -1, offsetof(Paned,paned.width), 0,0,GEOMETRY_CHANGED }, {TK_OPTION_INT, "-height", "height", "Height", "0", - -1,offsetof(Paned,paned.height), + -1, offsetof(Paned,paned.height), 0,0,GEOMETRY_CHANGED }, WIDGET_TAKEFOCUS_FALSE, @@ -100,7 +100,7 @@ typedef struct { static Tk_OptionSpec PaneOptionSpecs[] = { {TK_OPTION_INT, "-weight", "weight", "Weight", "0", - -1,offsetof(Pane,weight), 0,0,GEOMETRY_CHANGED }, + -1, offsetof(Pane,weight), 0,0,GEOMETRY_CHANGED }, {TK_OPTION_END, 0,0,0, NULL, -1,-1, 0,0,0} }; diff --git a/win/ttkWinTheme.c b/win/ttkWinTheme.c index 85fad14..ad3c94e 100644 --- a/win/ttkWinTheme.c +++ b/win/ttkWinTheme.c @@ -188,7 +188,7 @@ typedef struct { } BorderElement; static Ttk_ElementOptionSpec BorderElementOptions[] = { - { "-relief",TK_OPTION_RELIEF,offsetof(BorderElement,reliefObj), "flat" }, + { "-relief",TK_OPTION_RELIEF, offsetof(BorderElement,reliefObj), "flat" }, {NULL, 0, 0, NULL} }; @@ -542,7 +542,7 @@ typedef struct { } ThumbElement; static Ttk_ElementOptionSpec ThumbElementOptions[] = { - { "-orient", TK_OPTION_ANY,offsetof(ThumbElement,orientObj),"horizontal"}, + { "-orient", TK_OPTION_ANY, offsetof(ThumbElement,orientObj),"horizontal"}, { NULL, 0, 0, NULL } }; |