summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2015-02-12 12:51:10 (GMT)
committerdgp <dgp@users.sourceforge.net>2015-02-12 12:51:10 (GMT)
commit6dbbfe9f269314838207f70fd26de9a7d5394039 (patch)
tree587344f98f1985de320c58734134f3eee93b87f8 /generic
parent7d13b808151fa7b1fff9754f24f5f32739f5950b (diff)
downloadtk-6dbbfe9f269314838207f70fd26de9a7d5394039.zip
tk-6dbbfe9f269314838207f70fd26de9a7d5394039.tar.gz
tk-6dbbfe9f269314838207f70fd26de9a7d5394039.tar.bz2
Silence some compiler warnings
Diffstat (limited to 'generic')
-rw-r--r--generic/tkBitmap.c2
-rw-r--r--generic/tkInt.decls3
-rw-r--r--generic/tkIntDecls.h14
-rw-r--r--generic/tkStubInit.c2
-rw-r--r--generic/tkTextDisp.c2
-rw-r--r--generic/ttk/ttkLabel.c2
6 files changed, 19 insertions, 6 deletions
diff --git a/generic/tkBitmap.c b/generic/tkBitmap.c
index 09545d6..f7df546 100644
--- a/generic/tkBitmap.c
+++ b/generic/tkBitmap.c
@@ -304,7 +304,7 @@ GetBitmap(
TkBitmap *bitmapPtr, *existingBitmapPtr;
TkPredefBitmap *predefPtr;
Pixmap bitmap;
- int isNew, width, height, dummy2;
+ int isNew, width = 0, height = 0, dummy2;
TkDisplay *dispPtr = ((TkWindow *) tkwin)->dispPtr;
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
diff --git a/generic/tkInt.decls b/generic/tkInt.decls
index 17f39ba..4cbdb60 100644
--- a/generic/tkInt.decls
+++ b/generic/tkInt.decls
@@ -568,6 +568,9 @@ declare 180 {
char *TkSmoothPrintProc(ClientData clientData, Tk_Window tkwin,
char *widgRec, int offset, Tcl_FreeProc **freeProcPtr)
}
+declare 181 {
+ int TkpScanWindowId(Tcl_Interp *interp, const char *string, Window *idPtr)
+}
declare 184 {
void TkUnusedStubEntry(void)
}
diff --git a/generic/tkIntDecls.h b/generic/tkIntDecls.h
index 9dea8d4..b31bbd4 100644
--- a/generic/tkIntDecls.h
+++ b/generic/tkIntDecls.h
@@ -966,7 +966,12 @@ EXTERN char * TkSmoothPrintProc(ClientData clientData,
Tk_Window tkwin, char *widgRec, int offset,
Tcl_FreeProc **freeProcPtr);
#endif
-/* Slot 181 is reserved */
+#ifndef TkpScanWindowId_TCL_DECLARED
+#define TkpScanWindowId_TCL_DECLARED
+/* 181 */
+EXTERN int TkpScanWindowId(Tcl_Interp *interp,
+ CONST char *string, Window *idPtr);
+#endif
/* Slot 182 is reserved */
/* Slot 183 is reserved */
#ifndef TkUnusedStubEntry_TCL_DECLARED
@@ -1187,7 +1192,7 @@ typedef struct TkIntStubs {
char * (*tkOrientPrintProc) (ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 178 */
int (*tkSmoothParseProc) (ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, CONST char *value, char *widgRec, int offset); /* 179 */
char * (*tkSmoothPrintProc) (ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 180 */
- VOID *reserved181;
+ int (*tkpScanWindowId) (Tcl_Interp *interp, CONST char *string, Window *idPtr); /* 181 */
VOID *reserved182;
VOID *reserved183;
void (*tkUnusedStubEntry) (void); /* 184 */
@@ -1860,7 +1865,10 @@ extern TkIntStubs *tkIntStubsPtr;
#define TkSmoothPrintProc \
(tkIntStubsPtr->tkSmoothPrintProc) /* 180 */
#endif
-/* Slot 181 is reserved */
+#ifndef TkpScanWindowId
+#define TkpScanWindowId \
+ (tkIntStubsPtr->tkpScanWindowId) /* 181 */
+#endif
/* Slot 182 is reserved */
/* Slot 183 is reserved */
#ifndef TkUnusedStubEntry
diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c
index 79edc4d..b2e6314 100644
--- a/generic/tkStubInit.c
+++ b/generic/tkStubInit.c
@@ -478,7 +478,7 @@ TkIntStubs tkIntStubs = {
TkOrientPrintProc, /* 178 */
TkSmoothParseProc, /* 179 */
TkSmoothPrintProc, /* 180 */
- NULL, /* 181 */
+ TkpScanWindowId, /* 181 */
NULL, /* 182 */
NULL, /* 183 */
TkUnusedStubEntry, /* 184 */
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index 8cd5a9a..3edd5dc 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -6968,7 +6968,7 @@ DlineXOfIndex(
* coordinate. */
{
register TkTextDispChunk *chunkPtr = dlPtr->chunkPtr;
- int x;
+ int x = 0;
if (byteIndex == 0 || chunkPtr == NULL) {
return 0;
diff --git a/generic/ttk/ttkLabel.c b/generic/ttk/ttkLabel.c
index d51388b..1037840 100644
--- a/generic/ttk/ttkLabel.c
+++ b/generic/ttk/ttkLabel.c
@@ -293,6 +293,7 @@ static void ImageCleanup(ImageElement *image)
TtkFreeImageSpec(image->imageSpec);
}
+#ifndef MAC_OSX_TK
/*
* StippleOver --
* Draw a stipple over the image area, to make it look "grayed-out"
@@ -317,6 +318,7 @@ static void StippleOver(
Tk_FreeBitmapFromObj(tkwin, image->stippleObj);
}
}
+#endif
static void ImageDraw(
ImageElement *image, Tk_Window tkwin,Drawable d,Ttk_Box b,Ttk_State state)