summaryrefslogtreecommitdiffstats
path: root/win/tkWinSend.c
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2003-10-08 21:49:56 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2003-10-08 21:49:56 (GMT)
commitcb3e63058823409a46a89f7e720636bfa3cc48f1 (patch)
treeda7bf61d6949518714bf205fe936e53d6c2ce837 /win/tkWinSend.c
parentbd68659da7e1f828f00ca30ebd1e4c20d2befd3c (diff)
downloadtk-cb3e63058823409a46a89f7e720636bfa3cc48f1.zip
tk-cb3e63058823409a46a89f7e720636bfa3cc48f1.tar.gz
tk-cb3e63058823409a46a89f7e720636bfa3cc48f1.tar.bz2
* win/tcl.m4: Add TIP #150 items to the TEA makefiles.
* win/configure: * win/Makefile.in: * win/tkWinSend.c: Clean up some warnings from gcc -Wall. * win/tkWinSendCom.c:
Diffstat (limited to 'win/tkWinSend.c')
-rw-r--r--win/tkWinSend.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/win/tkWinSend.c b/win/tkWinSend.c
index 856e8f6..14a23c8 100644
--- a/win/tkWinSend.c
+++ b/win/tkWinSend.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinSend.c,v 1.4 2003/09/26 23:59:26 patthoyts Exp $
+ * RCS: @(#) $Id: tkWinSend.c,v 1.5 2003/10/08 21:49:57 patthoyts Exp $
*/
#include "tkPort.h"
@@ -197,7 +197,7 @@ TkGetInterpNames(interp, tkwin)
LPRUNNINGOBJECTTABLE pROT = NULL;
LPCOLESTR oleszStub = TKWINSEND_REGISTRATION_BASE;
HRESULT hr = S_OK;
- Tcl_Obj *objList;
+ Tcl_Obj *objList = NULL;
int r = TCL_OK;
hr = GetRunningObjectTable(0, &pROT);
@@ -293,7 +293,6 @@ Tk_SendObjCmd(clientData, interp, objc, objv)
};
int r = TCL_OK;
int i, optind, async = 0;
- HRESULT hr = S_OK;
Tcl_Obj *displayPtr = NULL;
/* process the command options */
@@ -660,7 +659,7 @@ Send(LPDISPATCH pdispInterp, Tcl_Interp *interp,
HRESULT hr = S_OK, ehr = S_OK;
Tcl_Obj *cmd = NULL;
DISPID dispid;
- RegisteredInterp *riPtr = (RegisteredInterp *)clientData;
+ /*RegisteredInterp *riPtr = (RegisteredInterp *)clientData;*/
cmd = Tcl_ConcatObj(objc, objv);
@@ -687,13 +686,13 @@ Send(LPDISPATCH pdispInterp, Tcl_Interp *interp,
dispid = async ? TKWINSENDCOM_DISPID_ASYNC : TKWINSENDCOM_DISPID_SEND;
hr = pdispInterp->lpVtbl->Invoke(pdispInterp, dispid,
- &IID_NULL, LOCALE_SYSTEM_DEFAULT, DISPATCH_METHOD,
- &dp, &vResult, &ei, &uiErr);
+ &IID_NULL, LOCALE_SYSTEM_DEFAULT, DISPATCH_METHOD,
+ &dp, &vResult, &ei, &uiErr);
/*
* Convert the result into a string and place in the interps result.
*/
-
+
ehr = VariantChangeType(&vResult, &vResult, 0, VT_BSTR);
if (SUCCEEDED(ehr))
Tcl_SetObjResult(interp, Tcl_NewUnicodeObj(vResult.bstrVal, -1));
@@ -707,12 +706,12 @@ Send(LPDISPATCH pdispInterp, Tcl_Interp *interp,
if (hr == DISP_E_EXCEPTION)
{
Tcl_Obj *opError, *opErrorCode, *opErrorInfo;
-
+
if (ei.bstrSource != NULL)
{
int len;
char * szErrorInfo;
-
+
opError = Tcl_NewUnicodeObj(ei.bstrSource, -1);
Tcl_ListObjIndex(interp, opError, 0, &opErrorCode);
Tcl_SetObjErrorCode(interp, opErrorCode);
@@ -760,7 +759,8 @@ Win32ErrorObj(HRESULT hrError)
Tcl_Obj* errPtr = NULL;
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
- NULL, hrError, LANG_NEUTRAL, (LPTSTR)&lpBuffer, 0, NULL);
+ NULL, (DWORD)hrError, LANG_NEUTRAL,
+ (LPTSTR)&lpBuffer, 0, NULL);
if (lpBuffer == NULL) {
lpBuffer = sBuffer;
@@ -771,9 +771,9 @@ Win32ErrorObj(HRESULT hrError)
*p = _T('\0');
#ifdef _UNICODE
- errPtr = Tcl_NewUnicodeObj(lpBuffer, wcslen(lpBuffer));
+ errPtr = Tcl_NewUnicodeObj(lpBuffer, (int)wcslen(lpBuffer));
#else
- errPtr = Tcl_NewStringObj(lpBuffer, strlen(lpBuffer));
+ errPtr = Tcl_NewStringObj(lpBuffer, (int)strlen(lpBuffer));
#endif
if (lpBuffer != sBuffer)
@@ -903,7 +903,7 @@ SendEventProc(Tcl_Event *eventPtr, int flags)
{
int r = TCL_OK;
SendEvent *evPtr = (SendEvent *)eventPtr;
- ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
+ /*ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);*/
TRACE("SendEventProc\n");