diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-03-10 10:57:51 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-03-10 10:57:51 (GMT) |
commit | 1360a9336e3403d578af136fb9d0b7a4eabd57b8 (patch) | |
tree | 1a5d7ab11cd886b99457247a3efa49cba0148c77 /generic | |
parent | e89bfca44403750e0e1b9f7f36ed67cd244ab73f (diff) | |
download | tk-1360a9336e3403d578af136fb9d0b7a4eabd57b8.zip tk-1360a9336e3403d578af136fb9d0b7a4eabd57b8.tar.gz tk-1360a9336e3403d578af136fb9d0b7a4eabd57b8.tar.bz2 |
Fix many gcc(-9) warnings, backported from trunk.
Add dummy X11 stub entries, marking entries added in Tk 8.6 and Tk 8.7.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkButton.c | 2 | ||||
-rw-r--r-- | generic/tkCanvArc.c | 32 | ||||
-rw-r--r-- | generic/tkClipboard.c | 10 | ||||
-rw-r--r-- | generic/tkImgPhoto.c | 2 | ||||
-rw-r--r-- | generic/tkInt.decls | 6 | ||||
-rw-r--r-- | generic/tkIntXlibDecls.h | 286 | ||||
-rw-r--r-- | generic/tkStubInit.c | 110 | ||||
-rw-r--r-- | generic/tkWindow.c | 6 | ||||
-rw-r--r-- | generic/ttk/ttkFrame.c | 22 |
9 files changed, 430 insertions, 46 deletions
diff --git a/generic/tkButton.c b/generic/tkButton.c index 0de949c..2083e20 100644 --- a/generic/tkButton.c +++ b/generic/tkButton.c @@ -150,7 +150,7 @@ static const Tk_OptionSpec labelOptionSpecs[] = { {TK_OPTION_PIXELS, "-wraplength", "wrapLength", "WrapLength", DEF_BUTTON_WRAP_LENGTH, Tk_Offset(TkButton, wrapLengthPtr), Tk_Offset(TkButton, wrapLength), 0, 0, 0}, - {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0} + {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0} }; static const Tk_OptionSpec buttonOptionSpecs[] = { diff --git a/generic/tkCanvArc.c b/generic/tkCanvArc.c index 55012a8..4efd098 100644 --- a/generic/tkCanvArc.c +++ b/generic/tkCanvArc.c @@ -114,13 +114,13 @@ static Tk_ConfigSpec configSpecs[] = { NULL, Tk_Offset(ArcItem, outline.activeDash), TK_CONFIG_NULL_OK, &dashOption}, {TK_CONFIG_COLOR, "-activefill", NULL, NULL, - NULL, Tk_Offset(ArcItem, activeFillColor), TK_CONFIG_NULL_OK}, + NULL, Tk_Offset(ArcItem, activeFillColor), TK_CONFIG_NULL_OK, 0}, {TK_CONFIG_COLOR, "-activeoutline", NULL, NULL, - NULL, Tk_Offset(ArcItem, outline.activeColor), TK_CONFIG_NULL_OK}, + NULL, Tk_Offset(ArcItem, outline.activeColor), TK_CONFIG_NULL_OK, 0}, {TK_CONFIG_BITMAP, "-activeoutlinestipple", NULL, NULL, - NULL, Tk_Offset(ArcItem, outline.activeStipple), TK_CONFIG_NULL_OK}, + NULL, Tk_Offset(ArcItem, outline.activeStipple), TK_CONFIG_NULL_OK, 0}, {TK_CONFIG_BITMAP, "-activestipple", NULL, NULL, - NULL, Tk_Offset(ArcItem, activeFillStipple), TK_CONFIG_NULL_OK}, + NULL, Tk_Offset(ArcItem, activeFillStipple), TK_CONFIG_NULL_OK, 0}, {TK_CONFIG_CUSTOM, "-activewidth", NULL, NULL, "0.0", Tk_Offset(ArcItem, outline.activeWidth), TK_CONFIG_DONT_SET_DEFAULT, &pixelOption}, @@ -128,41 +128,41 @@ static Tk_ConfigSpec configSpecs[] = { NULL, Tk_Offset(ArcItem, outline.dash), TK_CONFIG_NULL_OK, &dashOption}, {TK_CONFIG_PIXELS, "-dashoffset", NULL, NULL, - "0", Tk_Offset(ArcItem, outline.offset), TK_CONFIG_DONT_SET_DEFAULT}, + "0", Tk_Offset(ArcItem, outline.offset), TK_CONFIG_DONT_SET_DEFAULT, 0}, {TK_CONFIG_CUSTOM, "-disableddash", NULL, NULL, NULL, Tk_Offset(ArcItem, outline.disabledDash), TK_CONFIG_NULL_OK, &dashOption}, {TK_CONFIG_COLOR, "-disabledfill", NULL, NULL, - NULL, Tk_Offset(ArcItem, disabledFillColor), TK_CONFIG_NULL_OK}, + NULL, Tk_Offset(ArcItem, disabledFillColor), TK_CONFIG_NULL_OK, 0}, {TK_CONFIG_COLOR, "-disabledoutline", NULL, NULL, - NULL, Tk_Offset(ArcItem, outline.disabledColor), TK_CONFIG_NULL_OK}, + NULL, Tk_Offset(ArcItem, outline.disabledColor), TK_CONFIG_NULL_OK, 0}, {TK_CONFIG_BITMAP, "-disabledoutlinestipple", NULL, NULL, - NULL, Tk_Offset(ArcItem, outline.disabledStipple), TK_CONFIG_NULL_OK}, + NULL, Tk_Offset(ArcItem, outline.disabledStipple), TK_CONFIG_NULL_OK, 0}, {TK_CONFIG_BITMAP, "-disabledstipple", NULL, NULL, - NULL, Tk_Offset(ArcItem, disabledFillStipple), TK_CONFIG_NULL_OK}, + NULL, Tk_Offset(ArcItem, disabledFillStipple), TK_CONFIG_NULL_OK, 0}, {TK_CONFIG_CUSTOM, "-disabledwidth", NULL, NULL, "0.0", Tk_Offset(ArcItem, outline.disabledWidth), TK_CONFIG_DONT_SET_DEFAULT, &pixelOption}, {TK_CONFIG_DOUBLE, "-extent", NULL, NULL, - "90", Tk_Offset(ArcItem, extent), TK_CONFIG_DONT_SET_DEFAULT}, + "90", Tk_Offset(ArcItem, extent), TK_CONFIG_DONT_SET_DEFAULT, 0}, {TK_CONFIG_COLOR, "-fill", NULL, NULL, - NULL, Tk_Offset(ArcItem, fillColor), TK_CONFIG_NULL_OK}, + NULL, Tk_Offset(ArcItem, fillColor), TK_CONFIG_NULL_OK, 0}, {TK_CONFIG_CUSTOM, "-offset", NULL, NULL, "0,0", Tk_Offset(ArcItem, tsoffset), TK_CONFIG_DONT_SET_DEFAULT, &offsetOption}, {TK_CONFIG_COLOR, "-outline", NULL, NULL, - "black", Tk_Offset(ArcItem, outline.color), TK_CONFIG_NULL_OK}, + "black", Tk_Offset(ArcItem, outline.color), TK_CONFIG_NULL_OK, 0}, {TK_CONFIG_CUSTOM, "-outlineoffset", NULL, NULL, "0,0", Tk_Offset(ArcItem, outline.tsoffset), TK_CONFIG_DONT_SET_DEFAULT, &offsetOption}, {TK_CONFIG_BITMAP, "-outlinestipple", NULL, NULL, - NULL, Tk_Offset(ArcItem, outline.stipple), TK_CONFIG_NULL_OK}, + NULL, Tk_Offset(ArcItem, outline.stipple), TK_CONFIG_NULL_OK, 0}, {TK_CONFIG_DOUBLE, "-start", NULL, NULL, - "0", Tk_Offset(ArcItem, start), TK_CONFIG_DONT_SET_DEFAULT}, + "0", Tk_Offset(ArcItem, start), TK_CONFIG_DONT_SET_DEFAULT, 0}, {TK_CONFIG_CUSTOM, "-state", NULL, NULL, NULL, Tk_Offset(Tk_Item, state), TK_CONFIG_NULL_OK, &stateOption}, {TK_CONFIG_BITMAP, "-stipple", NULL, NULL, - NULL, Tk_Offset(ArcItem, fillStipple), TK_CONFIG_NULL_OK}, + NULL, Tk_Offset(ArcItem, fillStipple), TK_CONFIG_NULL_OK, 0}, {TK_CONFIG_CUSTOM, "-style", NULL, NULL, NULL, Tk_Offset(ArcItem, style), TK_CONFIG_DONT_SET_DEFAULT, &styleOption}, @@ -171,7 +171,7 @@ static Tk_ConfigSpec configSpecs[] = { {TK_CONFIG_CUSTOM, "-width", NULL, NULL, "1.0", Tk_Offset(ArcItem, outline.width), TK_CONFIG_DONT_SET_DEFAULT, &pixelOption}, - {TK_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0} + {TK_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0, 0} }; /* diff --git a/generic/tkClipboard.c b/generic/tkClipboard.c index c6748a1..d1422cf 100644 --- a/generic/tkClipboard.c +++ b/generic/tkClipboard.c @@ -147,7 +147,8 @@ ClipboardAppHandler( if (length > (size_t) maxBytes) { length = maxBytes; } - strncpy(buffer, p, length); + memcpy(buffer, p, length); + buffer[length] = 0; return (int)length; } @@ -282,7 +283,7 @@ Tk_ClipboardClear( if (!dispPtr->clipboardActive) { Tk_OwnSelection(dispPtr->clipWindow, dispPtr->clipboardAtom, - ClipboardLostSel, (ClientData) dispPtr); + ClipboardLostSel, dispPtr); dispPtr->clipboardActive = 1; } dispPtr->clipboardAppPtr = winPtr->mainPtr; @@ -341,7 +342,7 @@ Tk_ClipboardAppend( Tk_ClipboardClear(interp, tkwin); } else if (!dispPtr->clipboardActive) { Tk_OwnSelection(dispPtr->clipWindow, dispPtr->clipboardAtom, - ClipboardLostSel, (ClientData) dispPtr); + ClipboardLostSel, dispPtr); dispPtr->clipboardActive = 1; } @@ -597,7 +598,7 @@ Tk_ClipboardObjCmd( Tcl_DStringInit(&selBytes); result = Tk_GetSelection(interp, tkwin, selection, target, - ClipboardGetProc, (ClientData) &selBytes); + ClipboardGetProc, &selBytes); if (result == TCL_OK) { Tcl_DStringResult(interp, &selBytes); } else { @@ -708,7 +709,6 @@ ClipboardGetProc( Tcl_DStringAppend((Tcl_DString *) clientData, portion, -1); return TCL_OK; } - /* * Local Variables: diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c index 3976e8b..ffe4a3f 100644 --- a/generic/tkImgPhoto.c +++ b/generic/tkImgPhoto.c @@ -1476,7 +1476,7 @@ ImgPhotoCmd( } Tcl_Panic("unexpected fallthrough"); } - + /* FALLTHRU */ case PHOTO_WRITE: { char *data; Tcl_Obj *format; diff --git a/generic/tkInt.decls b/generic/tkInt.decls index c2d018c..2b04cc1 100644 --- a/generic/tkInt.decls +++ b/generic/tkInt.decls @@ -1394,6 +1394,9 @@ declare 134 win { declare 135 win { int XDrawPoints(Display *d, Drawable dr, GC gc, XPoint *p, int n, int m) } +declare 158 win { + void TkUnusedStubEntry(void) +} ################################ # X functions for Aqua @@ -1717,6 +1720,9 @@ declare 90 aqua { declare 91 aqua { int XSync(Display *display, Bool flag) } +declare 158 aqua { + void TkUnusedStubEntry(void) +} # Local Variables: # mode: tcl diff --git a/generic/tkIntXlibDecls.h b/generic/tkIntXlibDecls.h index a897241..010dd9c 100644 --- a/generic/tkIntXlibDecls.h +++ b/generic/tkIntXlibDecls.h @@ -734,6 +734,33 @@ EXTERN int XDrawPoint(Display *d, Drawable dr, GC gc, int x, EXTERN int XDrawPoints(Display *d, Drawable dr, GC gc, XPoint *p, int n, int m); #endif +/* Slot 136 is reserved */ +/* Slot 137 is reserved */ +/* Slot 138 is reserved */ +/* Slot 139 is reserved */ +/* Slot 140 is reserved */ +/* Slot 141 is reserved */ +/* Slot 142 is reserved */ +/* Slot 143 is reserved */ +/* Slot 144 is reserved */ +/* Slot 145 is reserved */ +/* Slot 146 is reserved */ +/* Slot 147 is reserved */ +/* Slot 148 is reserved */ +/* Slot 149 is reserved */ +/* Slot 150 is reserved */ +/* Slot 151 is reserved */ +/* Slot 152 is reserved */ +/* Slot 153 is reserved */ +/* Slot 154 is reserved */ +/* Slot 155 is reserved */ +/* Slot 156 is reserved */ +/* Slot 157 is reserved */ +#ifndef TkUnusedStubEntry_TCL_DECLARED +#define TkUnusedStubEntry_TCL_DECLARED +/* 158 */ +EXTERN void TkUnusedStubEntry(void); +#endif #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ #ifndef XSetDashes_TCL_DECLARED @@ -1274,6 +1301,77 @@ EXTERN Status XQueryTree(Display *d, Window w1, Window *w2, /* 91 */ EXTERN int XSync(Display *display, Bool flag); #endif +/* Slot 92 is reserved */ +/* Slot 93 is reserved */ +/* Slot 94 is reserved */ +/* Slot 95 is reserved */ +/* Slot 96 is reserved */ +/* Slot 97 is reserved */ +/* Slot 98 is reserved */ +/* Slot 99 is reserved */ +/* Slot 100 is reserved */ +/* Slot 101 is reserved */ +/* Slot 102 is reserved */ +/* Slot 103 is reserved */ +/* Slot 104 is reserved */ +/* Slot 105 is reserved */ +/* Slot 106 is reserved */ +/* Slot 107 is reserved */ +/* Slot 108 is reserved */ +/* Slot 109 is reserved */ +/* Slot 110 is reserved */ +/* Slot 111 is reserved */ +/* Slot 112 is reserved */ +/* Slot 113 is reserved */ +/* Slot 114 is reserved */ +/* Slot 115 is reserved */ +/* Slot 116 is reserved */ +/* Slot 117 is reserved */ +/* Slot 118 is reserved */ +/* Slot 119 is reserved */ +/* Slot 120 is reserved */ +/* Slot 121 is reserved */ +/* Slot 122 is reserved */ +/* Slot 123 is reserved */ +/* Slot 124 is reserved */ +/* Slot 125 is reserved */ +/* Slot 126 is reserved */ +/* Slot 127 is reserved */ +/* Slot 128 is reserved */ +/* Slot 129 is reserved */ +/* Slot 130 is reserved */ +/* Slot 131 is reserved */ +/* Slot 132 is reserved */ +/* Slot 133 is reserved */ +/* Slot 134 is reserved */ +/* Slot 135 is reserved */ +/* Slot 136 is reserved */ +/* Slot 137 is reserved */ +/* Slot 138 is reserved */ +/* Slot 139 is reserved */ +/* Slot 140 is reserved */ +/* Slot 141 is reserved */ +/* Slot 142 is reserved */ +/* Slot 143 is reserved */ +/* Slot 144 is reserved */ +/* Slot 145 is reserved */ +/* Slot 146 is reserved */ +/* Slot 147 is reserved */ +/* Slot 148 is reserved */ +/* Slot 149 is reserved */ +/* Slot 150 is reserved */ +/* Slot 151 is reserved */ +/* Slot 152 is reserved */ +/* Slot 153 is reserved */ +/* Slot 154 is reserved */ +/* Slot 155 is reserved */ +/* Slot 156 is reserved */ +/* Slot 157 is reserved */ +#ifndef TkUnusedStubEntry_TCL_DECLARED +#define TkUnusedStubEntry_TCL_DECLARED +/* 158 */ +EXTERN void TkUnusedStubEntry(void); +#endif #endif /* AQUA */ typedef struct TkIntXlibStubs { @@ -1417,6 +1515,29 @@ typedef struct TkIntXlibStubs { int (*xDrawSegments) (Display *d, Drawable dr, GC gc, XSegment *s, int n); /* 133 */ int (*xDrawPoint) (Display *d, Drawable dr, GC gc, int x, int y); /* 134 */ int (*xDrawPoints) (Display *d, Drawable dr, GC gc, XPoint *p, int n, int m); /* 135 */ + VOID *reserved136; + VOID *reserved137; + VOID *reserved138; + VOID *reserved139; + VOID *reserved140; + VOID *reserved141; + VOID *reserved142; + VOID *reserved143; + VOID *reserved144; + VOID *reserved145; + VOID *reserved146; + VOID *reserved147; + VOID *reserved148; + VOID *reserved149; + VOID *reserved150; + VOID *reserved151; + VOID *reserved152; + VOID *reserved153; + VOID *reserved154; + VOID *reserved155; + VOID *reserved156; + VOID *reserved157; + void (*tkUnusedStubEntry) (void); /* 158 */ #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ int (*xSetDashes) (Display *display, GC gc, int dash_offset, _Xconst char *dash_list, int n); /* 0 */ @@ -1511,6 +1632,73 @@ typedef struct TkIntXlibStubs { void (*xQueryColors) (Display *display, Colormap colormap, XColor *defs_in_out, int ncolors); /* 89 */ Status (*xQueryTree) (Display *d, Window w1, Window *w2, Window *w3, Window **w4, unsigned int *ui); /* 90 */ int (*xSync) (Display *display, Bool flag); /* 91 */ + VOID *reserved92; + VOID *reserved93; + VOID *reserved94; + VOID *reserved95; + VOID *reserved96; + VOID *reserved97; + VOID *reserved98; + VOID *reserved99; + VOID *reserved100; + VOID *reserved101; + VOID *reserved102; + VOID *reserved103; + VOID *reserved104; + VOID *reserved105; + VOID *reserved106; + VOID *reserved107; + VOID *reserved108; + VOID *reserved109; + VOID *reserved110; + VOID *reserved111; + VOID *reserved112; + VOID *reserved113; + VOID *reserved114; + VOID *reserved115; + VOID *reserved116; + VOID *reserved117; + VOID *reserved118; + VOID *reserved119; + VOID *reserved120; + VOID *reserved121; + VOID *reserved122; + VOID *reserved123; + VOID *reserved124; + VOID *reserved125; + VOID *reserved126; + VOID *reserved127; + VOID *reserved128; + VOID *reserved129; + VOID *reserved130; + VOID *reserved131; + VOID *reserved132; + VOID *reserved133; + VOID *reserved134; + VOID *reserved135; + VOID *reserved136; + VOID *reserved137; + VOID *reserved138; + VOID *reserved139; + VOID *reserved140; + VOID *reserved141; + VOID *reserved142; + VOID *reserved143; + VOID *reserved144; + VOID *reserved145; + VOID *reserved146; + VOID *reserved147; + VOID *reserved148; + VOID *reserved149; + VOID *reserved150; + VOID *reserved151; + VOID *reserved152; + VOID *reserved153; + VOID *reserved154; + VOID *reserved155; + VOID *reserved156; + VOID *reserved157; + void (*tkUnusedStubEntry) (void); /* 158 */ #endif /* AQUA */ } TkIntXlibStubs; @@ -2014,6 +2202,32 @@ extern TkIntXlibStubs *tkIntXlibStubsPtr; #define XDrawPoints \ (tkIntXlibStubsPtr->xDrawPoints) /* 135 */ #endif +/* Slot 136 is reserved */ +/* Slot 137 is reserved */ +/* Slot 138 is reserved */ +/* Slot 139 is reserved */ +/* Slot 140 is reserved */ +/* Slot 141 is reserved */ +/* Slot 142 is reserved */ +/* Slot 143 is reserved */ +/* Slot 144 is reserved */ +/* Slot 145 is reserved */ +/* Slot 146 is reserved */ +/* Slot 147 is reserved */ +/* Slot 148 is reserved */ +/* Slot 149 is reserved */ +/* Slot 150 is reserved */ +/* Slot 151 is reserved */ +/* Slot 152 is reserved */ +/* Slot 153 is reserved */ +/* Slot 154 is reserved */ +/* Slot 155 is reserved */ +/* Slot 156 is reserved */ +/* Slot 157 is reserved */ +#ifndef TkUnusedStubEntry +#define TkUnusedStubEntry \ + (tkIntXlibStubsPtr->tkUnusedStubEntry) /* 158 */ +#endif #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ #ifndef XSetDashes @@ -2384,6 +2598,76 @@ extern TkIntXlibStubs *tkIntXlibStubsPtr; #define XSync \ (tkIntXlibStubsPtr->xSync) /* 91 */ #endif +/* Slot 92 is reserved */ +/* Slot 93 is reserved */ +/* Slot 94 is reserved */ +/* Slot 95 is reserved */ +/* Slot 96 is reserved */ +/* Slot 97 is reserved */ +/* Slot 98 is reserved */ +/* Slot 99 is reserved */ +/* Slot 100 is reserved */ +/* Slot 101 is reserved */ +/* Slot 102 is reserved */ +/* Slot 103 is reserved */ +/* Slot 104 is reserved */ +/* Slot 105 is reserved */ +/* Slot 106 is reserved */ +/* Slot 107 is reserved */ +/* Slot 108 is reserved */ +/* Slot 109 is reserved */ +/* Slot 110 is reserved */ +/* Slot 111 is reserved */ +/* Slot 112 is reserved */ +/* Slot 113 is reserved */ +/* Slot 114 is reserved */ +/* Slot 115 is reserved */ +/* Slot 116 is reserved */ +/* Slot 117 is reserved */ +/* Slot 118 is reserved */ +/* Slot 119 is reserved */ +/* Slot 120 is reserved */ +/* Slot 121 is reserved */ +/* Slot 122 is reserved */ +/* Slot 123 is reserved */ +/* Slot 124 is reserved */ +/* Slot 125 is reserved */ +/* Slot 126 is reserved */ +/* Slot 127 is reserved */ +/* Slot 128 is reserved */ +/* Slot 129 is reserved */ +/* Slot 130 is reserved */ +/* Slot 131 is reserved */ +/* Slot 132 is reserved */ +/* Slot 133 is reserved */ +/* Slot 134 is reserved */ +/* Slot 135 is reserved */ +/* Slot 136 is reserved */ +/* Slot 137 is reserved */ +/* Slot 138 is reserved */ +/* Slot 139 is reserved */ +/* Slot 140 is reserved */ +/* Slot 141 is reserved */ +/* Slot 142 is reserved */ +/* Slot 143 is reserved */ +/* Slot 144 is reserved */ +/* Slot 145 is reserved */ +/* Slot 146 is reserved */ +/* Slot 147 is reserved */ +/* Slot 148 is reserved */ +/* Slot 149 is reserved */ +/* Slot 150 is reserved */ +/* Slot 151 is reserved */ +/* Slot 152 is reserved */ +/* Slot 153 is reserved */ +/* Slot 154 is reserved */ +/* Slot 155 is reserved */ +/* Slot 156 is reserved */ +/* Slot 157 is reserved */ +#ifndef TkUnusedStubEntry +#define TkUnusedStubEntry \ + (tkIntXlibStubsPtr->tkUnusedStubEntry) /* 158 */ +#endif #endif /* AQUA */ #endif /* defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS) */ @@ -2393,6 +2677,8 @@ extern TkIntXlibStubs *tkIntXlibStubsPtr; #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT +#undef TkUnusedStubEntry + #if defined(__WIN32__) #undef XFlush diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index 3573db0..3f6d348 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -79,20 +79,20 @@ XVisualIDFromVisual(Visual *visual) # undef XSynchronize # undef XSync -# define TkpCmapStressed (int (*) (Tk_Window, Colormap)) doNothing -# define TkpSync (void (*) (Display *)) doNothing +# define TkpCmapStressed (int (*) (Tk_Window, Colormap))(void *)doNothing +# define TkpSync (void (*) (Display *))(void *)doNothing # define TkUnixContainerId 0 # define TkUnixDoOneXEvent 0 # define TkUnixSetMenubar 0 -# define TkWmCleanup (void (*) (TkDisplay *)) doNothing -# define TkSendCleanup (void (*) (TkDisplay *)) doNothing +# define TkWmCleanup (void (*) (TkDisplay *))(void *)doNothing +# define TkSendCleanup (void (*) (TkDisplay *))(void *)doNothing # define TkpTestsendCmd 0 -# define XFlush (int (*) (Display *)) doNothing -# define XGrabServer (int (*) (Display *)) doNothing -# define XUngrabServer (int (*) (Display *)) doNothing -# define XNoOp (int (*) (Display *)) doNothing -# define XSynchronize (XAfterFunction (*) (Display *, Bool)) doNothing -# define XSync (int (*) (Display *, Bool)) doNothing +# define XFlush (int (*) (Display *))(void *)doNothing +# define XGrabServer (int (*) (Display *))(void *)doNothing +# define XUngrabServer (int (*) (Display *))(void *)doNothing +# define XNoOp (int (*) (Display *))(void *)doNothing +# define XSynchronize (XAfterFunction (*) (Display *, Bool))(void *)doNothing +# define XSync (int (*) (Display *, Bool))(void *)doNothing #else /* !__WIN32__ */ @@ -751,6 +751,29 @@ TkIntXlibStubs tkIntXlibStubs = { XDrawSegments, /* 133 */ XDrawPoint, /* 134 */ XDrawPoints, /* 135 */ + NULL, /* 136 */ + NULL, /* 137 */ + NULL, /* 138 */ + NULL, /* 139 */ + NULL, /* 140 */ + NULL, /* 141 */ + NULL, /* 142 */ + NULL, /* 143 */ + NULL, /* 144 */ + NULL, /* 145 */ + NULL, /* 146 */ + NULL, /* 147 */ + NULL, /* 148 */ + NULL, /* 149 */ + NULL, /* 150 */ + NULL, /* 151 */ + NULL, /* 152 */ + NULL, /* 153 */ + NULL, /* 154 */ + NULL, /* 155 */ + NULL, /* 156 */ + NULL, /* 157 */ + TkUnusedStubEntry, /* 158 */ #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ XSetDashes, /* 0 */ @@ -845,6 +868,73 @@ TkIntXlibStubs tkIntXlibStubs = { XQueryColors, /* 89 */ XQueryTree, /* 90 */ XSync, /* 91 */ + NULL, /* 92 */ + NULL, /* 93 */ + NULL, /* 94 */ + NULL, /* 95 */ + NULL, /* 96 */ + NULL, /* 97 */ + NULL, /* 98 */ + NULL, /* 99 */ + NULL, /* 100 */ + NULL, /* 101 */ + NULL, /* 102 */ + NULL, /* 103 */ + NULL, /* 104 */ + NULL, /* 105 */ + NULL, /* 106 */ + NULL, /* 107 */ + NULL, /* 108 */ + NULL, /* 109 */ + NULL, /* 110 */ + NULL, /* 111 */ + NULL, /* 112 */ + NULL, /* 113 */ + NULL, /* 114 */ + NULL, /* 115 */ + NULL, /* 116 */ + NULL, /* 117 */ + NULL, /* 118 */ + NULL, /* 119 */ + NULL, /* 120 */ + NULL, /* 121 */ + NULL, /* 122 */ + NULL, /* 123 */ + NULL, /* 124 */ + NULL, /* 125 */ + NULL, /* 126 */ + NULL, /* 127 */ + NULL, /* 128 */ + NULL, /* 129 */ + NULL, /* 130 */ + NULL, /* 131 */ + NULL, /* 132 */ + NULL, /* 133 */ + NULL, /* 134 */ + NULL, /* 135 */ + NULL, /* 136 */ + NULL, /* 137 */ + NULL, /* 138 */ + NULL, /* 139 */ + NULL, /* 140 */ + NULL, /* 141 */ + NULL, /* 142 */ + NULL, /* 143 */ + NULL, /* 144 */ + NULL, /* 145 */ + NULL, /* 146 */ + NULL, /* 147 */ + NULL, /* 148 */ + NULL, /* 149 */ + NULL, /* 150 */ + NULL, /* 151 */ + NULL, /* 152 */ + NULL, /* 153 */ + NULL, /* 154 */ + NULL, /* 155 */ + NULL, /* 156 */ + NULL, /* 157 */ + TkUnusedStubEntry, /* 158 */ #endif /* AQUA */ }; diff --git a/generic/tkWindow.c b/generic/tkWindow.c index 01ed94a..9751881 100644 --- a/generic/tkWindow.c +++ b/generic/tkWindow.c @@ -2868,7 +2868,7 @@ TkCygwinMainEx( /* dll is not present */ return 0; } - sym = (void (*)(int, char **, Tcl_AppInitProc *, Tcl_Interp *)) GetProcAddress(tkcygwindll, "Tk_MainEx"); + sym = (void (*)(int, char **, Tcl_AppInitProc *, Tcl_Interp *))(void *)GetProcAddress(tkcygwindll, "Tk_MainEx"); if (!sym) { return 0; } @@ -2907,7 +2907,7 @@ Tk_Init( if (tkcygwindll) { int (*sym)(Tcl_Interp *); - sym = (int (*)(Tcl_Interp *)) GetProcAddress(tkcygwindll, "Tk_Init"); + sym = (int (*)(Tcl_Interp *))(void *)GetProcAddress(tkcygwindll, "Tk_Init"); if (sym) { return sym(interp); } @@ -2980,7 +2980,7 @@ Tk_SafeInit( if (tkcygwindll) { int (*sym)(Tcl_Interp *); - sym = (int (*)(Tcl_Interp *)) GetProcAddress(tkcygwindll, "Tk_SafeInit"); + sym = (int (*)(Tcl_Interp *))(void *)GetProcAddress(tkcygwindll, "Tk_SafeInit"); if (sym) { return sym(interp); } diff --git a/generic/ttk/ttkFrame.c b/generic/ttk/ttkFrame.c index 7860024..fcea8ee 100644 --- a/generic/ttk/ttkFrame.c +++ b/generic/ttk/ttkFrame.c @@ -91,7 +91,7 @@ static Ttk_Padding FrameMargins(Frame *framePtr) */ static int FrameSize(void *recordPtr, int *widthPtr, int *heightPtr) { - Frame *framePtr = recordPtr; + Frame *framePtr = (Frame *)recordPtr; Ttk_SetMargins(framePtr->core.tkwin, FrameMargins(framePtr)); return 0; } @@ -112,7 +112,7 @@ static int FrameSize(void *recordPtr, int *widthPtr, int *heightPtr) static int FrameConfigure(Tcl_Interp *interp, void *recordPtr, int mask) { - Frame *framePtr = recordPtr; + Frame *framePtr = (Frame *)recordPtr; int width, height; /* @@ -341,7 +341,7 @@ LabelframeLabelSize(Labelframe *lframePtr, int *widthPtr, int *heightPtr) */ static int LabelframeSize(void *recordPtr, int *widthPtr, int *heightPtr) { - Labelframe *lframePtr = recordPtr; + Labelframe *lframePtr = (Labelframe *)recordPtr; WidgetCore *corePtr = &lframePtr->core; Ttk_Padding margins; LabelframeStyle style; @@ -386,7 +386,7 @@ static int LabelframeSize(void *recordPtr, int *widthPtr, int *heightPtr) static Ttk_Layout LabelframeGetLayout( Tcl_Interp *interp, Ttk_Theme theme, void *recordPtr) { - Labelframe *lf = recordPtr; + Labelframe *lf = (Labelframe *)recordPtr; Ttk_Layout frameLayout = TtkWidgetGetLayout(interp, theme, recordPtr); Ttk_Layout labelLayout; @@ -417,7 +417,7 @@ static Ttk_Layout LabelframeGetLayout( static void LabelframeDoLayout(void *recordPtr) { - Labelframe *lframePtr = recordPtr; + Labelframe *lframePtr = (Labelframe *)recordPtr; WidgetCore *corePtr = &lframePtr->core; int lw, lh; /* Label width and height */ LabelframeStyle style; @@ -441,8 +441,10 @@ static void LabelframeDoLayout(void *recordPtr) */ switch (LabelAnchorSide(style.labelAnchor)) { case TTK_SIDE_LEFT: borderParcel.x -= lw / 2; + /* FALLTHRU */ case TTK_SIDE_RIGHT: borderParcel.width += lw/2; break; case TTK_SIDE_TOP: borderParcel.y -= lh / 2; + /* FALLTHRU */ case TTK_SIDE_BOTTOM: borderParcel.height += lh / 2; break; } } @@ -461,7 +463,7 @@ static void LabelframeDoLayout(void *recordPtr) static void LabelframeDisplay(void *recordPtr, Drawable d) { - Labelframe *lframePtr = recordPtr; + Labelframe *lframePtr = (Labelframe *)recordPtr; Ttk_DrawLayout(lframePtr->core.layout, lframePtr->core.state, d); if (lframePtr->label.labelLayout) { Ttk_DrawLayout(lframePtr->label.labelLayout, lframePtr->core.state, d); @@ -476,7 +478,7 @@ static void LabelframeDisplay(void *recordPtr, Drawable d) */ static void LabelframePlaceSlaves(void *recordPtr) { - Labelframe *lframe = recordPtr; + Labelframe *lframe = (Labelframe *)recordPtr; if (Ttk_NumberSlaves(lframe->label.mgr) == 1) { Ttk_Box b; @@ -518,7 +520,7 @@ static Ttk_ManagerSpec LabelframeManagerSpec = { */ static void LabelframeInitialize(Tcl_Interp *interp, void *recordPtr) { - Labelframe *lframe = recordPtr; + Labelframe *lframe = (Labelframe *)recordPtr; lframe->label.mgr = Ttk_CreateManager( &LabelframeManagerSpec, lframe, lframe->core.tkwin); @@ -532,7 +534,7 @@ static void LabelframeInitialize(Tcl_Interp *interp, void *recordPtr) */ static void LabelframeCleanup(void *recordPtr) { - Labelframe *lframe = recordPtr; + Labelframe *lframe = (Labelframe *)recordPtr; Ttk_DeleteManager(lframe->label.mgr); if (lframe->label.labelLayout) { Ttk_FreeLayout(lframe->label.labelLayout); @@ -563,7 +565,7 @@ static void RaiseLabelWidget(Labelframe *lframe) */ static int LabelframeConfigure(Tcl_Interp *interp,void *recordPtr,int mask) { - Labelframe *lframePtr = recordPtr; + Labelframe *lframePtr = (Labelframe *)recordPtr; Tk_Window labelWidget = lframePtr->label.labelWidget; Ttk_PositionSpec unused; |