diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2007-01-11 15:35:39 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2007-01-11 15:35:39 (GMT) |
commit | a7b45de808c4bca805fab7b4eb90aa6e6f09e2ac (patch) | |
tree | 9afda096b9165b4f20fb70975876d2bf0c1c2c29 /win/tkWinClipboard.c | |
parent | a46a8df372318c40d2d0c346578eef7412a7b257 (diff) | |
download | tk-a7b45de808c4bca805fab7b4eb90aa6e6f09e2ac.zip tk-a7b45de808c4bca805fab7b4eb90aa6e6f09e2ac.tar.gz tk-a7b45de808c4bca805fab7b4eb90aa6e6f09e2ac.tar.bz2 |
Many minute fixes to reduce number of minor warnings from GCC.
Diffstat (limited to 'win/tkWinClipboard.c')
-rw-r--r-- | win/tkWinClipboard.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/win/tkWinClipboard.c b/win/tkWinClipboard.c index bb91f4d..093280c 100644 --- a/win/tkWinClipboard.c +++ b/win/tkWinClipboard.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinClipboard.c,v 1.8 2005/12/02 00:19:04 dkf Exp $ + * RCS: @(#) $Id: tkWinClipboard.c,v 1.9 2007/01/11 15:35:40 dkf Exp $ */ #include "tkWinInt.h" @@ -275,7 +275,7 @@ TkWinClipboardRender( * Copy the data and change EOL characters. */ - buffer = rawText = ckalloc(length + 1); + buffer = rawText = ckalloc((unsigned)length + 1); if (targetPtr != NULL) { for (cbPtr = targetPtr->firstBufferPtr; cbPtr != NULL; cbPtr = cbPtr->nextPtr) { @@ -300,13 +300,14 @@ TkWinClipboardRender( Tcl_UtfToUniCharDString(rawText, -1, &ds); ckfree(rawText); handle = GlobalAlloc(GMEM_MOVEABLE|GMEM_DDESHARE, - Tcl_DStringLength(&ds)+2); + (unsigned) Tcl_DStringLength(&ds) + 2); if (!handle) { Tcl_DStringFree(&ds); return; } buffer = GlobalLock(handle); - memcpy(buffer, Tcl_DStringValue(&ds), Tcl_DStringLength(&ds) + 2); + memcpy(buffer, Tcl_DStringValue(&ds), + (unsigned) Tcl_DStringLength(&ds) + 2); GlobalUnlock(handle); Tcl_DStringFree(&ds); SetClipboardData(CF_UNICODETEXT, handle); @@ -314,13 +315,14 @@ TkWinClipboardRender( Tcl_UtfToExternalDString(NULL, rawText, -1, &ds); ckfree(rawText); handle = GlobalAlloc(GMEM_MOVEABLE|GMEM_DDESHARE, - Tcl_DStringLength(&ds)+1); + (unsigned) Tcl_DStringLength(&ds) + 1); if (!handle) { Tcl_DStringFree(&ds); return; } buffer = GlobalLock(handle); - memcpy(buffer, Tcl_DStringValue(&ds), Tcl_DStringLength(&ds) + 1); + memcpy(buffer, Tcl_DStringValue(&ds), + (unsigned) Tcl_DStringLength(&ds) + 1); GlobalUnlock(handle); Tcl_DStringFree(&ds); SetClipboardData(CF_TEXT, handle); |