View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0026669 | Open CASCADE | OCCT:Coding | public | 2015-09-09 13:03 | 2016-04-20 15:48 |
Reporter | Assigned To | bugmaster | |||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Target Version | 7.0.0 | Fixed in Version | 7.0.0 | ||
Summary | 0026669: Eliminate compile warnings obtained by building occt with vc14: 'type cast': conversion from 'BOOL' to 'WNDPROC' of greater size | ||||
Description | Next warnings appears during occt compilation with vc14: ..\src\Draw\init.cxx(79): warning C4312: 'type cast': conversion from 'BOOL' to 'WNDPROC' of greater size | ||||
Steps To Reproduce | Try to compile occt with vc14 (Visual Studio 2015) | ||||
Tags | No tags attached. | ||||
Test case number | Not needed | ||||
|
Branch CR26669 has been created by rkv. SHA-1: ed43af8ab9148e03f153cdee8e82f7174f635ad4 Detailed log of new commits: Author: rkv Date: Tue Sep 29 20:09:15 2015 +0300 0026669: Eliminate compile warnings obtained by building occt with vc14: 'type cast': conversion from 'BOOL' to 'WNDPROC' of greater size |
|
- wndClass.lpfnWndProc = (WNDPROC)CommandProc((HWND)WndProc,(WPARAM)342,(LPARAM)443); + wndClass.lpfnWndProc = (WNDPROC)(LONG_PTR)CommandProc((HWND)WndProc,(WPARAM)342,(LPARAM)443); //wndClass.lpfnWndProc = (WNDPROC)CommandProc; the patch makes absolutely no sense - it just suppresses warning pointing onto broken code. And please correct git settings on your workstation. |
|
> Thu Sep 22 21:55:24 2005 > Porting on Windows 64-bit cxx only: - wndClass.lpfnWndProc = CommandProc; + wndClass.lpfnWndProc = (WNDPROC)CommandProc((HWND)WndProc,(WPARAM)342,(LPARAM)443); + //wndClass.lpfnWndProc = (WNDPROC)CommandProc; these code lines have been initially introduced within the patch for porting onto 64-bit Windows, and look like a temporary testing code. |
|
Branch CR26669 has been updated by rkv. SHA-1: 9ebad74ba6dd83d6058e3b49643f24d86c5daabe Detailed log of new commits: Author: rkv Date: Thu Oct 1 16:16:23 2015 +0300 Signature of the command window callback has been fixed to avoid unnecessary type casting. It is used when Draw_IsConsoleSubsystem = Standard_False i.e. in non-console mode (see _main_() in Draw_Main.cxx). |
|
Branch CR26669 has been updated forcibly by rkv. SHA-1: 784a7f040dd06cfcfc3062a84c8c0bda807db6b4 |
|
The fixed callback is not used in usual DRAW working mode (with console). It is supposed to be used for MDI mode. To test the changes I had to set Draw_IsConsoleSubsystem = Standard_False in _main_() in Draw_Main.cxx There is only one case when it could be activated in usual mode - in Run_Appli() in Draw_Window.cxx if there is a problem with thread creation: if (Draw_IsConsoleSubsystem) { hThread = CreateThread(NULL, // no security attributes ... if (!hThread) { cout << "pb in creation of the thread reading stdin" << endl; Draw_IsConsoleSubsystem = Standard_False; Init_Appli(GetModuleHandle(NULL), GetModuleHandle(NULL), 1, hWnd); // reinit => create MDI client wnd } However it is not clear how to reproduce it. |
|
Please test the patch.- CommandProc(hWndFrame, wParam, lParam); + CmdProc(hWndFrame, LOWORD(wParam), wParam, lParam); note that this technically incorrect - window procedures should be called only using auxiliary function CallWindowProc(). However this does not matter in this context. |
|
Branch CR26669 has been updated forcibly by mkv. SHA-1: 1838553394a067a86fb2ce223a117355d77c65f4 |
|
Dear BugMaster, Branch CR26669 was rebased on current master of occt git-repository. SHA-1: 1838553394a067a86fb2ce223a117355d77c65f4 |
|
Dear BugMaster, Branch CR26669 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode. SHA-1: 1838553394a067a86fb2ce223a117355d77c65f4 Number of compiler warnings: occt component : Linux: 13 (13 on master) Windows: 4 (0 on master) products component : Linux: 39 (39 on master) Windows: 0 (0 on master) There is new additional compilation warning on Windows platform: http://jenkins-test-01.nnov.opencascade.com:8080/user/mnt/my-views/view/A_mnt_warnings/portlet/dashboard_portlet_17008/job/CR26669-master_build_occt_windows_64/1/warnings34Result/ MainWindow.cxx:91, MSBuild, Priority: Normal 'wParam' : unreferenced formal parameter MainWindow.cxx:91, MSBuild, Priority: Normal 'lParam' : unreferenced formal parameter Regressions/Differences/Improvements: No regressions/differences Testing cases: Not needed Testing on Linux: occt component : Total MEMORY difference: 92502279 / 92365865 [+0.15%] Total CPU difference: 19797.799999999766 / 19809.56999999982 [-0.06%] products component : Total MEMORY difference: 26330169 / 26369733 [-0.15%] Total CPU difference: 7256.990000000004 / 7378.749999999995 [-1.65%] Testing on Windows: occt component : Total MEMORY difference: 58069681 / 58089039 [-0.03%] Total CPU difference: 18258.23223919938 / 18228.68564979895 [+0.16%] products component : Total MEMORY difference: 17178481 / 17183716 [-0.03%] Total CPU difference: 5667.141927599961 / 5689.09126829997 [-0.39%] There are no differences in images found by testdiff. |
|
Dear rkv, Branch CR26669 has been rejected due to: - additional warnings |
|
Branch CR26669 has been updated forcibly by rkv. SHA-1: 8d92a8b2a0f010b1c94a7e1de7d1e42e78ce91cf |
|
Dear rkv,0026669: Eliminate compile warnings obtained by building occt with vc14: 'type cast': conversion from 'BOOL' to 'WNDPROC' of greater size please update commit description following bug workflow rules. |
|
Branch CR26669 has been updated forcibly by rkv. SHA-1: ff01fb07ebb4b69c40662c359ecc8294467c883a |
|
Please test the patch. |
|
Dear BugMaster, Branch CR26669 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode. SHA-1: ff01fb07ebb4b69c40662c359ecc8294467c883a Number of compiler warnings: occt component : Linux: 13 (13 on master) Windows: 0 (0 on master) products component : Linux: 39 (39 on master) Windows: 0 (0 on master) Regressions/Differences/Improvements: No regressions/differences Testing cases: Not needed Testing on Linux: occt component : Total MEMORY difference: 92619586 / 92366914 [+0.27%] Total CPU difference: 19849.979999999796 / 19809.65999999982 [+0.20%] products component : Total MEMORY difference: 26321887 / 26369733 [-0.18%] Total CPU difference: 7421.169999999992 / 7378.749999999995 [+0.57%] Testing on Windows: occt component : Total MEMORY difference: 58080467 / 58089039 [-0.01%] Total CPU difference: 19091.589581198663 / 18228.68564979895 [+4.73%] products component : Total MEMORY difference: 17178479 / 17183716 [-0.03%] Total CPU difference: 5829.382967599973 / 5689.09126829997 [+2.47%] There are no differences in images found by testdiff. |
|
Dear BugMaster, Branch CR26669 is TESTED. |
|
Branch CR26669 has been deleted by kgv. SHA-1: ff01fb07ebb4b69c40662c359ecc8294467c883a |
occt: master 839b8d3c 2015-10-06 13:43:47
Committer: bugmaster Details Diff |
0026669: Eliminate compile warnings obtained by building occt with vc14: 'type cast': conversion from 'BOOL' to 'WNDPROC' of greater size Signature of the command window callback has been fixed to avoid unnecessary type casting. It is used when Draw_IsConsoleSubsystem = Standard_False i.e. in non-console mode (see _main_() in Draw_Main.cxx). |
Affected Issues 0026669 |
|
mod - src/Draw/init.cxx | Diff File | ||
mod - src/Draw/MainWindow.cxx | Diff File | ||
mod - src/Draw/MAINWINDOW.h | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2015-09-09 13:03 |
|
New Issue | |
2015-09-09 13:03 |
|
Assigned To | => ski |
2015-09-09 14:21 |
|
Assigned To | ski => abv |
2015-09-21 07:03 |
|
Assigned To | abv => rkv |
2015-09-21 07:03 |
|
Status | new => assigned |
2015-09-29 20:09 | git | Note Added: 0046297 | |
2015-09-29 20:10 |
|
Assigned To | rkv => kgv |
2015-09-29 20:10 |
|
Status | assigned => resolved |
2015-09-29 20:10 |
|
Assigned To | kgv => abv |
2015-09-29 20:27 | kgv | Note Added: 0046298 | |
2015-09-29 20:27 | kgv | Assigned To | abv => rkv |
2015-09-29 20:27 | kgv | Status | resolved => assigned |
2015-09-29 20:42 | kgv | Note Added: 0046299 | |
2015-09-29 20:42 | kgv | Note Edited: 0046299 | |
2015-09-29 20:42 | kgv | Note Edited: 0046299 | |
2015-10-01 16:16 | git | Note Added: 0046378 | |
2015-10-01 16:19 | git | Note Added: 0046379 | |
2015-10-01 16:28 |
|
Note Added: 0046380 | |
2015-10-01 16:29 |
|
Assigned To | rkv => kgv |
2015-10-01 16:29 |
|
Status | assigned => resolved |
2015-10-05 12:05 | kgv | Note Added: 0046443 | |
2015-10-05 12:05 | kgv | Assigned To | kgv => bugmaster |
2015-10-05 12:05 | kgv | Status | resolved => reviewed |
2015-10-05 13:12 | git | Note Added: 0046448 | |
2015-10-05 13:25 |
|
Assigned To | bugmaster => mkv |
2015-10-06 15:18 |
|
Note Added: 0046516 | |
2015-10-06 15:18 |
|
Note Added: 0046517 | |
2015-10-06 15:19 |
|
Note Added: 0046518 | |
2015-10-06 15:19 |
|
Assigned To | mkv => rkv |
2015-10-06 15:19 |
|
Status | reviewed => assigned |
2015-10-06 15:19 |
|
Test case number | => Not needed |
2015-10-06 16:44 | git | Note Added: 0046526 | |
2015-10-06 16:44 |
|
Assigned To | rkv => kgv |
2015-10-06 16:44 |
|
Status | assigned => resolved |
2015-10-06 16:48 | kgv | Note Added: 0046529 | |
2015-10-06 16:50 | kgv | Assigned To | kgv => rkv |
2015-10-06 16:50 | kgv | Status | resolved => assigned |
2015-10-07 09:57 | git | Note Added: 0046540 | |
2015-10-07 09:57 |
|
Assigned To | rkv => kgv |
2015-10-07 09:57 |
|
Status | assigned => resolved |
2015-10-07 10:09 | kgv | Note Added: 0046542 | |
2015-10-07 10:09 | kgv | Assigned To | kgv => bugmaster |
2015-10-07 10:09 | kgv | Status | resolved => reviewed |
2015-10-07 13:03 |
|
Assigned To | bugmaster => mkv |
2015-10-09 21:11 |
|
Note Added: 0046653 | |
2015-10-09 21:12 |
|
Note Added: 0046654 | |
2015-10-09 21:12 |
|
Assigned To | mkv => bugmaster |
2015-10-09 21:12 |
|
Status | reviewed => tested |
2015-10-16 13:18 | bugmaster | Changeset attached | => occt master 839b8d3c |
2015-10-16 13:18 | bugmaster | Status | tested => verified |
2015-10-16 13:18 | bugmaster | Resolution | open => fixed |
2015-10-16 16:28 | git | Note Added: 0046952 | |
2016-04-20 15:44 |
|
Fixed in Version | => 7.0.0 |
2016-04-20 15:48 |
|
Status | verified => closed |