diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-02-07 14:01:40 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-02-07 14:01:40 (GMT) |
commit | 1e218f90dab9db97b0f7b9c3013c78b871e11b36 (patch) | |
tree | 912ff82a558de9bcc791b4a258ecb3ae9813edf0 /win/tkWinFont.c | |
parent | 3b6539c93da9d08acd3779c6f96da23d646acb21 (diff) | |
download | tk-1e218f90dab9db97b0f7b9c3013c78b871e11b36.zip tk-1e218f90dab9db97b0f7b9c3013c78b871e11b36.tar.gz tk-1e218f90dab9db97b0f7b9c3013c78b871e11b36.tar.bz2 |
Use more TCL_UNUSED() macro's in stead of (void) casts
Diffstat (limited to 'win/tkWinFont.c')
-rw-r--r-- | win/tkWinFont.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/win/tkWinFont.c b/win/tkWinFont.c index c6da8ee..375af22 100644 --- a/win/tkWinFont.c +++ b/win/tkWinFont.c @@ -6,7 +6,7 @@ * * Copyright (c) 1994 Software Research Associates, Inc. * Copyright (c) 1995-1997 Sun Microsystems, Inc. - * Copyright (c) 1998-1999 by Scriptics Corporation. + * Copyright (c) 1998-1999 Scriptics Corporation. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. @@ -850,7 +850,7 @@ Tk_MeasureChars( if (thisSubFontPtr != lastSubFontPtr) { familyPtr = lastSubFontPtr->familyPtr; Tcl_UtfToExternalDString(familyPtr->encoding, start, - (int) (p - start), &runString); + p - start, &runString); size.cx = 0; familyPtr->getTextExtentPoint32Proc(hdc, (WCHAR *)Tcl_DStringValue(&runString), @@ -878,7 +878,7 @@ Tk_MeasureChars( familyPtr = lastSubFontPtr->familyPtr; Tcl_UtfToExternalDString(familyPtr->encoding, start, - (int) (p - start), &runString); + p - start, &runString); size.cx = 0; familyPtr->getTextExtentPoint32Proc(hdc, (WCHAR *) Tcl_DStringValue(&runString), Tcl_DStringLength(&runString) >> familyPtr->isWideFont, @@ -1416,7 +1416,7 @@ TkpDrawAngledCharsInContext( * passed to this function. If they are not * stripped out, they will be displayed as * regular printing characters. */ - int numBytes, /* Number of bytes in string. */ + TCL_UNUSED(int), /* Number of bytes in string. */ int rangeStart, /* Index of first byte to draw. */ int rangeLength, /* Length of range to draw in bytes. */ double x, double y, /* Coordinates at which to place origin of the @@ -1426,7 +1426,6 @@ TkpDrawAngledCharsInContext( { int widthUntilStart; double sinA = sin(angle * PI/180.0), cosA = cos(angle * PI/180.0); - (void) numBytes; /*unused*/ Tk_MeasureChars(tkfont, source, rangeStart, -1, 0, &widthUntilStart); TkDrawAngledChars(display, drawable, gc, tkfont, source + rangeStart, @@ -1494,7 +1493,7 @@ MultiFontTextOut( if (p > source) { familyPtr = lastSubFontPtr->familyPtr; Tcl_UtfToExternalDString(familyPtr->encoding, source, - (int) (p - source), &runString); + p - source, &runString); familyPtr->textOutProc(hdc, (int)(x-(double)tm.tmOverhang/2.0), y, (WCHAR *)Tcl_DStringValue(&runString), Tcl_DStringLength(&runString) >> familyPtr->isWideFont); @@ -1516,7 +1515,7 @@ MultiFontTextOut( if (p > source) { familyPtr = lastSubFontPtr->familyPtr; Tcl_UtfToExternalDString(familyPtr->encoding, source, - (int) (p - source), &runString); + p - source, &runString); familyPtr->textOutProc(hdc, (int)(x-(double)tm.tmOverhang/2.0), y, (WCHAR *)Tcl_DStringValue(&runString), Tcl_DStringLength(&runString) >> familyPtr->isWideFont); @@ -1818,7 +1817,7 @@ AllocFontFamily( &familyPtr->endCount, &familyPtr->isSymbolFont); encoding = NULL; - if (familyPtr->isSymbolFont != 0) { + if (familyPtr->isSymbolFont) { /* * Symbol fonts are handled specially. For instance, Unicode 0393 * (GREEK CAPITAL GAMMA) must be mapped to Symbol character 0047 |