summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-08-21 13:27:55 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-08-21 13:27:55 (GMT)
commitc3a1c1de43aa94d3bd7fafe4e993976573caa782 (patch)
tree5eaa96dd5c499e853269541705e5aee1134c2e98
parent59ecd12c26ca188117e6ac97b8d1746af5be4356 (diff)
parentb0cb20ac4634f999816139408519cad3f65e475a (diff)
downloadtk-c3a1c1de43aa94d3bd7fafe4e993976573caa782.zip
tk-c3a1c1de43aa94d3bd7fafe4e993976573caa782.tar.gz
tk-c3a1c1de43aa94d3bd7fafe4e993976573caa782.tar.bz2
Fix [bb85d249dd]: valgrind complaints on 'canvas image' command (TIP 489)
-rw-r--r--doc/ttk_style.n2
-rw-r--r--generic/tkCanvas.c12
2 files changed, 7 insertions, 7 deletions
diff --git a/doc/ttk_style.n b/doc/ttk_style.n
index 0de3311..5d7b5d1 100644
--- a/doc/ttk_style.n
+++ b/doc/ttk_style.n
@@ -134,7 +134,7 @@ as \fB\-expand\fR 1).
\fB\-sticky\fR \fB[\fInswe\fB]\fR
Specifies the actual parcel position and size inside the allocated parcel.
If specified as an empty string then the actual parcel is centered in
-the allocated parcel. Default is \fBnswe\fR.
+the allocated parcel. Default is \fBnswe\fR.
.\" -unit should remain undocumented for now (dubious usefulness)
.\" .TP
.\" \fB\-unit\fR \fIboolean\fR
diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c
index 33c9d59..5d87539 100644
--- a/generic/tkCanvas.c
+++ b/generic/tkCanvas.c
@@ -988,7 +988,7 @@ CanvasWidgetCmd(
if (objc == 5) {
int append = 0;
- unsigned long mask;
+ unsigned int mask;
const char *argv4 = Tcl_GetString(objv[4]);
if (argv4[0] == 0) {
@@ -1036,7 +1036,7 @@ CanvasWidgetCmd(
result = TCL_ERROR;
goto done;
}
- if (mask & ~(unsigned long)(ButtonMotionMask|Button1MotionMask
+ if (mask & ~(ButtonMotionMask|Button1MotionMask
|Button2MotionMask|Button3MotionMask|Button4MotionMask
|Button5MotionMask|ButtonPressMask|ButtonReleaseMask
|EnterWindowMask|LeaveWindowMask|KeyPressMask
@@ -2503,7 +2503,7 @@ CanvasWorldChanged(
*/
static void
DecomposeMaskToShiftAndBits(
- unsigned long mask, /* The pixel mask to examine */
+ unsigned int mask, /* The pixel mask to examine */
int *shift, /* Where to put the shift count (position of lowest bit) */
int *bits) /* Where to put the bit count (width of the pixel mask) */
{
@@ -2849,7 +2849,7 @@ DrawCanvas(
#endif
for(x = 0; x < blockPtr.width; ++x) {
- unsigned long pixel = 0;
+ unsigned int pixel = 0;
switch (ximagePtr->bits_per_pixel) {
@@ -2881,7 +2881,7 @@ DrawCanvas(
*/
case 32 :
- pixel = *((unsigned long *)(ximagePtr->data + bytesPerPixel * x
+ pixel = *((unsigned int *)(ximagePtr->data + bytesPerPixel * x
+ ximagePtr->bytes_per_line * y));
if ((IS_BIG_ENDIAN && ximagePtr->byte_order == LSBFirst)
|| (!IS_BIG_ENDIAN && ximagePtr->byte_order == MSBFirst))
@@ -5178,7 +5178,7 @@ PickCurrentItem(
* ButtonRelease, or MotionNotify. */
{
double coords[2];
- unsigned long buttonDown;
+ unsigned int buttonDown;
Tk_Item *prevItemPtr;
SearchUids *searchUids = GetStaticUids();