Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | [Bug 3388350] mingw64 compiler warnings |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
63dbae8717c1659f7d1a39c24c92939d |
User & Date: | jan.nijtmans 2011-08-16 13:31:51 |
Context
2011-09-01
| ||
10:31 | Correctly documented what the [$ph data] command produces without the -format option. check-in: 6ab2c76c user: dkf tags: trunk | |
2011-08-16
| ||
13:31 | [Bug 3388350] mingw64 compiler warnings check-in: 63dbae87 user: jan.nijtmans tags: trunk | |
13:17 | [Bug 3388350] mingw64 compiler warnings check-in: 49d005d8 user: jan.nijtmans tags: core-8-5-branch | |
08:34 | merge-mark check-in: 2f899f1c user: jan.nijtmans tags: trunk | |
Changes
Changes to ChangeLog.
1 2 3 4 5 6 7 8 9 10 11 12 | 2011-08-13 Jan Nijtmans <[email protected]> * generic/tkBitmap.c: [Bug 3388350] mingw64 compiler warnings * generic/tkConsole.c * win/tkWinDialog.c * win/tkWinSend.c * win/tkWinSendCom.c 2011-08-05 Don Porter <[email protected]> *** 8.6b2 TAGGED FOR RELEASE *** | > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 2011-08-16 Jan Nijtmans <[email protected]> * win/tkWinDialog.c: [Bug 3388350] mingw64 compiler warnings * win/tkWinEmbed.c * win/tkWinMenu.c * win/tkWinTest.c * win/tkWinWm.c * win/tkWinX.c 2011-08-13 Jan Nijtmans <[email protected]> * generic/tkBitmap.c: [Bug 3388350] mingw64 compiler warnings * generic/tkConsole.c * win/tkWinDialog.c * win/tkWinEmbed.c * win/tkWinSend.c * win/tkWinSendCom.c 2011-08-05 Don Porter <[email protected]> *** 8.6b2 TAGGED FOR RELEASE *** |
︙ | ︙ |
Changes to win/tkWinDialog.c.
︙ | ︙ | |||
1012 1013 1014 1015 1016 1017 1018 | if ((selsize > 1) && (dirsize > 0)) { if (ofnData->dynFileBufferSize < buffersize) { buffer = ckrealloc(buffer, buffersize); ofnData->dynFileBufferSize = buffersize; ofnData->dynFileBuffer = (char *) buffer; } | | | | 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 | if ((selsize > 1) && (dirsize > 0)) { if (ofnData->dynFileBufferSize < buffersize) { buffer = ckrealloc(buffer, buffersize); ofnData->dynFileBufferSize = buffersize; ofnData->dynFileBuffer = (char *) buffer; } SendMessage(hdlg, CDM_GETFOLDERPATH, dirsize, PTR2INT(buffer)); buffer += dirsize; SendMessage(hdlg, CDM_GETSPEC, selsize, PTR2INT(buffer)); /* * If there are multiple files, delete the quotes and change * every second quote to NULL terminator */ if (buffer[0] == '"') { |
︙ | ︙ |
Changes to win/tkWinEmbed.c.
︙ | ︙ | |||
255 256 257 258 259 260 261 | } return TCL_OK; } if (Tcl_GetInt(interp, string, &id) != TCL_OK) { return TCL_ERROR; } | | | | | 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 | } return TCL_OK; } if (Tcl_GetInt(interp, string, &id) != TCL_OK) { return TCL_ERROR; } hwnd = (HWND) INT2PTR(id); if ((HWND)winPtr->privatePtr == hwnd) { return TCL_OK; } /* * Check if the window is a valid handle. If it is invalid, return * TCL_ERROR and potentially leave an error message in the interp's * result. */ if (!IsWindow(hwnd)) { if (interp != NULL) { Tcl_AppendResult(interp, "window \"", string, "\" doesn't exist", NULL); } return TCL_ERROR; } id = SendMessage(hwnd, TK_INFO, TK_CONTAINER_VERIFY, 0); if (id == PTR2INT(hwnd)) { if (!SendMessage(hwnd, TK_INFO, TK_CONTAINER_ISAVAILABLE, 0)) { Tcl_AppendResult(interp, "The container is already in use", NULL); return TCL_ERROR; } } else if (id == -PTR2INT(hwnd)) { Tcl_AppendResult(interp, "the window to use is not a Tk container", NULL); return TCL_ERROR; } else { /* * Proceed if the user decide to do so because it can be a legacy * container application. However we may have to return a TCL_ERROR in |
︙ | ︙ | |||
453 454 455 456 457 458 459 | */ switch(wParam) { case TK_CONTAINER_ISAVAILABLE: result = containerPtr->embeddedHWnd == NULL? 1:0; break; case TK_CONTAINER_VERIFY: | | | 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 | */ switch(wParam) { case TK_CONTAINER_ISAVAILABLE: result = containerPtr->embeddedHWnd == NULL? 1:0; break; case TK_CONTAINER_VERIFY: result = PTR2INT(containerPtr->parentHWnd); break; default: result = 0; } break; case TK_ATTACHWINDOW: |
︙ | ︙ | |||
491 492 493 494 495 496 497 | if (winPtr) { winPtr->flags |= TK_BOTH_HALVES; containerPtr->embeddedPtr = winPtr; containerPtr->parentPtr->flags |= TK_BOTH_HALVES; } containerPtr->embeddedHWnd = (HWND)wParam; } | | | 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 | if (winPtr) { winPtr->flags |= TK_BOTH_HALVES; containerPtr->embeddedPtr = winPtr; containerPtr->parentPtr->flags |= TK_BOTH_HALVES; } containerPtr->embeddedHWnd = (HWND)wParam; } result = PTR2INT(containerPtr->parentHWnd); } else { result = 0; } break; case TK_DETACHWINDOW: /* |
︙ | ︙ | |||
564 565 566 567 568 569 570 | * * Return vlaue: * * A handle of the frame window. If it is not availble, a zero is * returned. */ if (topwinPtr) { | | | | 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 | * * Return vlaue: * * A handle of the frame window. If it is not availble, a zero is * returned. */ if (topwinPtr) { result = PTR2INT(GetParent(containerPtr->parentHWnd)); } else { topwinPtr = containerPtr->parentPtr; while (!(topwinPtr->flags & TK_TOP_HIERARCHY)) { topwinPtr = topwinPtr->parentPtr; } if (topwinPtr && topwinPtr->window) { result = PTR2INT(GetParent(Tk_GetHWND(topwinPtr->window))); } else { result = 0; } } break; case TK_CLAIMFOCUS: |
︙ | ︙ | |||
755 756 757 758 759 760 761 | } } else { if ((message == TK_INFO) && (wParam == TK_CONTAINER_VERIFY)) { /* * Reply the message sender: this is not a Tk container */ | | | 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 | } } else { if ((message == TK_INFO) && (wParam == TK_CONTAINER_VERIFY)) { /* * Reply the message sender: this is not a Tk container */ return -PTR2INT(hwnd); } else { result = 0; } } return result; } |
︙ | ︙ |
Changes to win/tkWinMenu.c.
︙ | ︙ | |||
432 433 434 435 436 437 438 | if (NULL != winMenuHdl) { if (!(menuPtr->menuFlags & MENU_RECONFIGURE_PENDING)) { menuPtr->menuFlags |= MENU_RECONFIGURE_PENDING; Tcl_DoWhenIdle(ReconfigureWindowsMenu, (ClientData) menuPtr); } } | | | 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 | if (NULL != winMenuHdl) { if (!(menuPtr->menuFlags & MENU_RECONFIGURE_PENDING)) { menuPtr->menuFlags |= MENU_RECONFIGURE_PENDING; Tcl_DoWhenIdle(ReconfigureWindowsMenu, (ClientData) menuPtr); } } FreeID((WORD) PTR2INT(mePtr->platformEntryData)); mePtr->platformEntryData = NULL; } /* *---------------------------------------------------------------------- * * GetEntryText -- |
︙ | ︙ | |||
621 622 623 624 625 626 627 | flags |= MF_SEPARATOR; } if (mePtr->columnBreak) { flags |= MF_MENUBREAK; } | | | | 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 | flags |= MF_SEPARATOR; } if (mePtr->columnBreak) { flags |= MF_MENUBREAK; } itemID = PTR2INT(mePtr->platformEntryData); if ((mePtr->type == CASCADE_ENTRY) && (mePtr->childMenuRefPtr != NULL) && (mePtr->childMenuRefPtr->menuPtr != NULL)) { HMENU childMenuHdl = (HMENU) mePtr->childMenuRefPtr->menuPtr ->platformData; if (childMenuHdl != NULL) { /* * Win32 draws the popup arrow in the wrong color for a * disabled cascade menu, so do it by hand. Given it is * disabled, there's no need for it to be connected to its * child. */ if (mePtr->state != ENTRY_DISABLED) { flags |= MF_POPUP; /* * If the MF_POPUP flag is set, then the id is interpreted * as the handle of a submenu. */ itemID = PTR2INT(childMenuHdl); } } if ((menuPtr->menuType == MENUBAR) && !(mePtr->childMenuRefPtr->menuPtr->menuFlags & MENU_SYSTEM_MENU)) { Tcl_DString ds; TkMenuReferences *menuRefPtr; |
︙ | ︙ | |||
851 852 853 854 855 856 857 | } if (!(menuPtr->menuFlags & MENU_RECONFIGURE_PENDING)) { menuPtr->menuFlags |= MENU_RECONFIGURE_PENDING; Tcl_DoWhenIdle(ReconfigureWindowsMenu, (ClientData) menuPtr); } | | | 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 | } if (!(menuPtr->menuFlags & MENU_RECONFIGURE_PENDING)) { menuPtr->menuFlags |= MENU_RECONFIGURE_PENDING; Tcl_DoWhenIdle(ReconfigureWindowsMenu, (ClientData) menuPtr); } mePtr->platformEntryData = (TkMenuPlatformEntryData) INT2PTR(commandID); return TCL_OK; } /* *---------------------------------------------------------------------- * |
︙ | ︙ |
Changes to win/tkWinTest.c.
︙ | ︙ | |||
296 297 298 299 300 301 302 | #ifdef _WIN64 (sscanf(string, "0x%p", &number) != 1) && #endif /* _WIN64 */ Tcl_GetInt(interp, string, (int *)&number) != TCL_OK) { return TCL_ERROR; } #endif | | | 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 | #ifdef _WIN64 (sscanf(string, "0x%p", &number) != 1) && #endif /* _WIN64 */ Tcl_GetInt(interp, string, (int *)&number) != TCL_OK) { return TCL_ERROR; } #endif hwnd = INT2PTR(strtol(argv[1], &rest, 0)); if (rest == argv[1]) { hwnd = FindWindowA(NULL, argv[1]); if (hwnd == NULL) { Tcl_SetResult(interp, "no such window", TCL_STATIC); return TCL_ERROR; } } |
︙ | ︙ | |||
420 421 422 423 424 425 426 | hwnd = tkTestWinProcs->findWindow(class, title); if (hwnd == NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj("failed to find window: ", -1)); AppendSystemError(interp, GetLastError()); r = TCL_ERROR; } else { | | | | 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 | hwnd = tkTestWinProcs->findWindow(class, title); if (hwnd == NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj("failed to find window: ", -1)); AppendSystemError(interp, GetLastError()); r = TCL_ERROR; } else { Tcl_SetObjResult(interp, Tcl_NewLongObj(PTR2INT(hwnd))); } Tcl_DStringFree(&titleString); Tcl_DStringFree(&classString); return r; } static BOOL CALLBACK EnumChildrenProc( HWND hwnd, LPARAM lParam) { Tcl_Obj *listObj = (Tcl_Obj *) lParam; Tcl_ListObjAppendElement(NULL, listObj, Tcl_NewLongObj(PTR2INT(hwnd))); return TRUE; } static int TestgetwindowinfoObjCmd( ClientData clientData, Tcl_Interp *interp, |
︙ | ︙ | |||
461 462 463 464 465 466 467 | Tcl_WrongNumArgs(interp, 1, objv, "hwnd"); return TCL_ERROR; } if (Tcl_GetLongFromObj(interp, objv[1], &hwnd) != TCL_OK) return TCL_ERROR; | | | | | | | 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 | Tcl_WrongNumArgs(interp, 1, objv, "hwnd"); return TCL_ERROR; } if (Tcl_GetLongFromObj(interp, objv[1], &hwnd) != TCL_OK) return TCL_ERROR; cch = tkTestWinProcs->getClassName(INT2PTR(hwnd), buf, cchBuf); if (cch == 0) { Tcl_SetResult(interp, "failed to get class name: ", TCL_STATIC); AppendSystemError(interp, GetLastError()); return TCL_ERROR; } else { Tcl_DString ds; Tcl_WinTCharToUtf(buf, -1, &ds); classObj = Tcl_NewStringObj(Tcl_DStringValue(&ds), Tcl_DStringLength(&ds)); Tcl_DStringFree(&ds); } dictObj = Tcl_NewDictObj(); Tcl_DictObjPut(interp, dictObj, Tcl_NewStringObj("class", 5), classObj); Tcl_DictObjPut(interp, dictObj, Tcl_NewStringObj("id", 2), Tcl_NewLongObj(GetWindowLongA(INT2PTR(hwnd), GWL_ID))); cch = tkTestWinProcs->getWindowText(INT2PTR(hwnd), (LPTSTR)buf, cchBuf); textObj = Tcl_NewUnicodeObj((LPCWSTR)buf, cch); Tcl_DictObjPut(interp, dictObj, Tcl_NewStringObj("text", 4), textObj); Tcl_DictObjPut(interp, dictObj, Tcl_NewStringObj("parent", 6), Tcl_NewLongObj(PTR2INT(GetParent((INT2PTR(hwnd)))))); childrenObj = Tcl_NewListObj(0, NULL); EnumChildWindows(INT2PTR(hwnd), EnumChildrenProc, (LPARAM)childrenObj); Tcl_DictObjPut(interp, dictObj, Tcl_NewStringObj("children", -1), childrenObj); Tcl_SetObjResult(interp, dictObj); return TCL_OK; } static int |
︙ | ︙ |
Changes to win/tkWinWm.c.
︙ | ︙ | |||
3687 3688 3689 3690 3691 3692 3693 | if (Tk_WindowId((Tk_Window) winPtr) == None) { Tk_MakeWindowExist((Tk_Window) winPtr); } hwnd = wmPtr->wrapper; if (hwnd == NULL) { hwnd = Tk_GetHWND(Tk_WindowId((Tk_Window) winPtr)); } | | | 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 | if (Tk_WindowId((Tk_Window) winPtr) == None) { Tk_MakeWindowExist((Tk_Window) winPtr); } hwnd = wmPtr->wrapper; if (hwnd == NULL) { hwnd = Tk_GetHWND(Tk_WindowId((Tk_Window) winPtr)); } Tcl_SetObjResult(interp, Tcl_ObjPrintf("0x%x", PTR2INT(hwnd))); return TCL_OK; } /* *---------------------------------------------------------------------- * * WmGeometryCmd -- |
︙ | ︙ |
Changes to win/tkWinX.c.
︙ | ︙ | |||
256 257 258 259 260 261 262 | Tcl_Panic("Unable to register TkChild class"); } /* * Initialize input language info */ | | | | 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 | Tcl_Panic("Unable to register TkChild class"); } /* * Initialize input language info */ if (GetLocaleInfo(LANGIDFROMLCID(PTR2INT(GetKeyboardLayout(0))), LOCALE_IDEFAULTANSICODEPAGE | LOCALE_RETURN_NUMBER, (LPTSTR) &lpCP, sizeof(lpCP)/sizeof(TCHAR)) && TranslateCharsetInfo(INT2PTR(lpCP), &lpCs, TCI_SRCCODEPAGE)) { UpdateInputLanguage((int) lpCs.ciCharset); } /* * Make sure we cleanup on finalize. */ |
︙ | ︙ | |||
480 481 482 483 484 485 486 | * information: the number of color planes and the number of pixels per * plane. Need to remember both quantities so that when constructing an * HBITMAP for offscreen rendering, we can specify the correct value for * the number of planes. Otherwise the HBITMAP won't be compatible with * the HWND and we'll just get blank spots copied onto the screen. */ | | | | 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 | * information: the number of color planes and the number of pixels per * plane. Need to remember both quantities so that when constructing an * HBITMAP for offscreen rendering, we can specify the correct value for * the number of planes. Otherwise the HBITMAP won't be compatible with * the HWND and we'll just get blank spots copied onto the screen. */ screen->ext_data = INT2PTR(GetDeviceCaps(dc, PLANES)); screen->root_depth = GetDeviceCaps(dc, BITSPIXEL) * PTR2INT(screen->ext_data); if (screen->root_visual != NULL) { ckfree(screen->root_visual); } screen->root_visual = ckalloc(sizeof(Visual)); screen->root_visual->visualid = 0; if (GetDeviceCaps(dc, RASTERCAPS) & RC_PALETTE) { |
︙ | ︙ | |||
1424 1425 1426 1427 1428 1429 1430 | CHARSETINFO charsetInfo; Tcl_Encoding encoding; char codepage[4 + TCL_INTEGER_SPACE]; if (keyInputCharset == charset) { return; } | | | 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 | CHARSETINFO charsetInfo; Tcl_Encoding encoding; char codepage[4 + TCL_INTEGER_SPACE]; if (keyInputCharset == charset) { return; } if (TranslateCharsetInfo(INT2PTR(charset), &charsetInfo, TCI_SRCCHARSET) == 0) { /* * Some mysterious failure. */ return; } |
︙ | ︙ | |||
1912 1913 1914 1915 1916 1917 1918 | inp.type = INPUT_MOUSE; inp.mi.dx = 0; inp.mi.dy = 0; inp.mi.mouseData = 0; inp.mi.dwFlags = MOUSEEVENTF_MOVE; inp.mi.time = 0; | | | 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 | inp.type = INPUT_MOUSE; inp.mi.dx = 0; inp.mi.dy = 0; inp.mi.mouseData = 0; inp.mi.dwFlags = MOUSEEVENTF_MOVE; inp.mi.time = 0; inp.mi.dwExtraInfo = (DWORD) 0; SendInput(1, &inp, sizeof(inp)); } /* * Local Variables: * mode: c * c-basic-offset: 4 * fill-column: 78 * End: */ |