View Issue Details

IDProjectCategoryView StatusLast Update
0026784Open CASCADEOCCT:Codingpublic2016-04-20 15:51
Reporterkgv Assigned Tobugmaster  
PrioritynormalSeverityintegration request 
Status closedResolutionfixed 
PlatformLinuxOSDebian 6.0 
Product Version6.9.1 
Target Version7.0.0Fixed in Version7.0.0 
Summary0026784: Coding rules - eliminate GCC warning -Wunused-parameter
DescriptionThe following warnings generated by gcc 4.9.2 with option -Wextra should be eliminated:
/occt/src/NCollection/NCollection_WinHeapAllocator.cxx|28|warning: unused parameter ‘theInitSizeBytes’ [-Wunused-parameter]|
/occt/src/OSD/OSD_signal.cxx|118|warning: unused parameter ‘theSigInfo’ [-Wunused-parameter]|
/occt/src/OSD/OSD_signal.cxx|118|warning: unused parameter ‘theContext’ [-Wunused-parameter]|
/occt/src/OSD/OSD_signal.cxx|332|warning: unused parameter ‘theSignal’ [-Wunused-parameter]|
/occt/src/OSD/OSD_signal.cxx|334|warning: unused parameter ‘theContext’ [-Wunused-parameter]|
/occt/src/OSD/OSD_Thread.cxx|261|warning: unused parameter ‘time’ [-Wunused-parameter]|
/occt/src/V3d/V3d_View_Print.cxx|85|warning: unused parameter ‘thePrintDC’ [-Wunused-parameter]|
/occt/src/V3d/V3d_View_Print.cxx|86|warning: unused parameter ‘theShowDialog’ [-Wunused-parameter]|
/occt/src/V3d/V3d_View_Print.cxx|87|warning: unused parameter ‘theShowBackground’ [-Wunused-parameter]|
/occt/src/V3d/V3d_View_Print.cxx|88|warning: unused parameter ‘theFilename’ [-Wunused-parameter]|
/occt/src/V3d/V3d_View_Print.cxx|89|warning: unused parameter ‘thePrintAlgorithm’ [-Wunused-parameter]|
/occt/src/OpenGl/OpenGl_Text.cxx|474|warning: unused parameter ‘thePrintCtx’ [-Wunused-parameter]|
/occt/src/OpenGl/OpenGl_View_Print.cxx|276|warning: unused parameter ‘thePrinterDC’ [-Wunused-parameter]|
/occt/src/OpenGl/OpenGl_View_Print.cxx|277|warning: unused parameter ‘theToShowBackground’ [-Wunused-parameter]|
/occt/src/OpenGl/OpenGl_View_Print.cxx|278|warning: unused parameter ‘theFileName’ [-Wunused-parameter]|
/occt/src/OpenGl/OpenGl_View_Print.cxx|279|warning: unused parameter ‘thePrintAlgorithm’ [-Wunused-parameter]|
/occt/src/OpenGl/OpenGl_View_Print.cxx|280|warning: unused parameter ‘theScaleFactor’ [-Wunused-parameter]|
/occt/src/ViewerTest/ViewerTest_ViewerCommands.cxx|4274|warning: unused parameter ‘argc’ [-Wunused-parameter]|
/occt/src/ViewerTest/ViewerTest_ViewerCommands.cxx|4275|warning: unused parameter ‘argv’ [-Wunused-parameter]|
Steps To ReproduceN/A
TagsNo tags attached.
Test case numberNot needed

Activities

git

2015-10-27 10:06

administrator   ~0047460

Branch CR26784 has been created by rkv.

SHA-1: 2dd08f04543fe57fb9b3dc56649e588a0aad7d37


Detailed log of new commits:

Author: rkv
Date: Tue Oct 27 10:05:16 2015 +0300

    26784: Coding rules - eliminate GCC warning -Wunused-parameter
    Unused params have been commented.

kgv

2015-10-27 10:42

developer   ~0047463

Last edited: 2015-10-27 10:43

-Standard_Boolean OSD_Thread::Wait (const Standard_Integer time, Standard_Address &result) const
+Standard_Boolean OSD_Thread::Wait (
+  const Standard_Integer 
+#ifdef _WIN32
+  time 
+#endif  
+  , Standard_Address &result) const

Please use "(void )theParam" syntax in function body (within #else) instead of commenting parameters.

git

2015-10-27 11:51

administrator   ~0047472

Branch CR26784 has been updated forcibly by rkv.

SHA-1: e1fdf22e98f8fadb5d5089cfe050cd1b383d766d

kgv

2015-10-27 12:51

developer   ~0047476

+  (void)theInitSizeBytes; // 0026784: avoid unused parameter warning of GCC

please drop redundant comments.

26784: Coding rules - eliminate GCC warning -Wunused-parameter

please copy bug description exactly as it shown in Mantis - with 00 in the beginning. See other patches in OCCT git.
"0026784: Coding rules - eliminate GCC warning -Wunused-parameter"

git

2015-10-27 13:20

administrator   ~0047480

Branch CR26784 has been updated forcibly by rkv.

SHA-1: d2c57dacdc393f9be7f073675391c688055d4311

kgv

2015-10-27 13:49

developer   ~0047482

-Standard_Boolean OSD_Thread::Wait (const Standard_Integer time, Standard_Address &result) const
+Standard_Boolean OSD_Thread::Wait (
+  const Standard_Integer time,
+  Standard_Address &result) const
...
 #ifdef _WIN32
-
   // On Windows, wait for the thread handle to be signaled

please drop unrelated changes.

+# if defined(HAVE_PTHREAD_H) && defined(NO_CXX_EXCEPTION)
 static void Handler (const int theSignal, siginfo_t *theSigInfo, const Standard_Address theContext)
+# else
+static void Handler (const int theSignal, siginfo_t */*theSigInfo*/, const Standard_Address /*theContext*/)
+# endif

the change is still there.

git

2015-10-27 14:04

administrator   ~0047483

Branch CR26784 has been updated forcibly by rkv.

SHA-1: 1e7a82bb22745857342f88c8cb8cd6cc1c81c670

kgv

2015-10-27 14:06

developer   ~0047485

Please check compilation, testing is not needed.

abv

2015-10-27 17:45

manager   ~0047501

In OSD_Thread:Wait(), pthread_timedjoin_np() should be used instead of pthread_join(), to be coherent with Windows. In that case, time argument will be properly used.

git

2015-10-28 15:04

administrator   ~0047535

Branch CR26784 has been updated by rkv.

SHA-1: dac938b6c18bc83b6a5281abe9ffb74377ae7098


Detailed log of new commits:

Author: rkv
Date: Wed Oct 28 15:04:22 2015 +0300

    0026784: Coding rules - eliminate GCC warning -Wunused-parameter
    Use pthread_timedjoin_np() instead of pthread_join() in OSD_Thread:Wait().

git

2015-10-28 15:43

administrator   ~0047545

Branch CR26784 has been updated forcibly by rkv.

SHA-1: 0740d0d366b9aeb8e4f69a2c43a6aa9744a2ea85

git

2015-10-29 10:43

administrator   ~0047575

Branch CR26784_1 has been created by kgv.

SHA-1: a39c5a8378337a065079051381fe7e077ec8ab2d


Detailed log of new commits:

Author: rkv
Date: Thu Oct 29 10:43:23 2015 +0300

    0026784: Coding rules - eliminate GCC warning -Wunused-parameter
    
    OSD_Thread - use pthread_timedjoin_np() instead of pthread_join() when available (glibc extension).
    Suppress unused parameter warning in OSD_Signal, NCollection_WinHeapAllocator, OpenGl_Text, OpenGl_View, V3d_View and ViewerTest.

kgv

2015-10-29 10:45

developer   ~0047577

Please test the patch in branch CR26784_1.

git

2015-10-29 18:48

administrator   ~0047628

Branch CR26784_1 has been updated forcibly by mkv.

SHA-1: b50d6792ea02b72be14793d05509d4f4b2b8e3b8

mkv

2015-10-30 15:09

tester   ~0047654

Dear BugMaster,
Branch CR26784_1 was rebased on branch IR-2015-10-29 of occt git-repository.
SHA-1: b50d6792ea02b72be14793d05509d4f4b2b8e3b8

mkv

2015-10-30 15:09

tester   ~0047655

Dear BugMaster,
Branch CR26784_1 from occt git-repository (and IR-2015-10-29 from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: b50d6792ea02b72be14793d05509d4f4b2b8e3b8

Number of compiler warnings:

occt component :
Linux: 0 (0 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: 92726794 / 92753766 [-0.03%]
Total CPU difference: 19842.999999999767 / 19828.47999999975 [+0.07%]
products component :
Total MEMORY difference: 26119372 / 26214549 [-0.36%]
Total CPU difference: 7365.989999999991 / 7524.209999999983 [-2.10%]

Testing on Windows:
occt component :
Total MEMORY difference: 58097594 / 58119838 [-0.04%]
Total CPU difference: 18378.103407598926 / 18132.38623249892 [+1.36%]
products component :
Total MEMORY difference: 17114498 / 17116760 [-0.01%]
Total CPU difference: 5972.201883099993 / 5650.730622399967 [+5.69%]

There are no differences in images found by testdiff.

mkv

2015-10-30 15:10

tester   ~0047656

Dear BugMaster,
Branch CR26784_1 is TESTED.

git

2016-04-17 14:26

administrator   ~0053168

Branch CR26784 has been deleted by kgv.

SHA-1: 0740d0d366b9aeb8e4f69a2c43a6aa9744a2ea85

git

2016-04-17 14:26

administrator   ~0053169

Branch CR26784_1 has been deleted by kgv.

SHA-1: b50d6792ea02b72be14793d05509d4f4b2b8e3b8

Related Changesets

occt: master c85385c0

2015-10-29 07:43:23

rkv


Committer: bugmaster Details Diff
0026784: Coding rules - eliminate GCC warning -Wunused-parameter

OSD_Thread - use pthread_timedjoin_np() instead of pthread_join() when available (glibc extension).
Suppress unused parameter warning in OSD_Signal, NCollection_WinHeapAllocator, OpenGl_Text, OpenGl_View, V3d_View and ViewerTest.
Affected Issues
0026784
mod - src/NCollection/NCollection_WinHeapAllocator.cxx Diff File
mod - src/OpenGl/OpenGl_Text.cxx Diff File
mod - src/OpenGl/OpenGl_View_Print.cxx Diff File
mod - src/OSD/OSD_signal.cxx Diff File
mod - src/OSD/OSD_Thread.cxx Diff File
mod - src/V3d/V3d_View_Print.cxx Diff File
mod - src/ViewerTest/ViewerTest_ViewerCommands.cxx Diff File

Issue History

Date Modified Username Field Change
2015-10-16 10:54 kgv New Issue
2015-10-16 10:54 kgv Assigned To => kgv
2015-10-16 10:54 kgv Assigned To kgv => rkv
2015-10-16 10:54 kgv Status new => assigned
2015-10-27 10:06 git Note Added: 0047460
2015-10-27 10:07 rkv Assigned To rkv => kgv
2015-10-27 10:07 rkv Status assigned => resolved
2015-10-27 10:42 kgv Note Added: 0047463
2015-10-27 10:42 kgv Assigned To kgv => rkv
2015-10-27 10:42 kgv Status resolved => assigned
2015-10-27 10:43 kgv Note Edited: 0047463
2015-10-27 11:51 git Note Added: 0047472
2015-10-27 11:51 rkv Assigned To rkv => kgv
2015-10-27 11:51 rkv Status assigned => resolved
2015-10-27 12:51 kgv Note Added: 0047476
2015-10-27 12:51 kgv Assigned To kgv => rkv
2015-10-27 12:51 kgv Status resolved => assigned
2015-10-27 13:20 git Note Added: 0047480
2015-10-27 13:21 rkv Assigned To rkv => kgv
2015-10-27 13:21 rkv Status assigned => resolved
2015-10-27 13:49 kgv Note Added: 0047482
2015-10-27 13:49 kgv Assigned To kgv => rkv
2015-10-27 13:49 kgv Status resolved => assigned
2015-10-27 14:04 git Note Added: 0047483
2015-10-27 14:04 rkv Assigned To rkv => kgv
2015-10-27 14:04 rkv Status assigned => resolved
2015-10-27 14:06 kgv Note Added: 0047485
2015-10-27 14:06 kgv Assigned To kgv => bugmaster
2015-10-27 14:06 kgv Status resolved => reviewed
2015-10-27 15:55 apv Assigned To bugmaster => apv
2015-10-27 17:45 abv Note Added: 0047501
2015-10-27 18:30 kgv Assigned To apv => rkv
2015-10-27 18:30 kgv Status reviewed => assigned
2015-10-28 15:04 git Note Added: 0047535
2015-10-28 15:43 git Note Added: 0047545
2015-10-28 15:44 rkv Assigned To rkv => kgv
2015-10-28 15:44 rkv Status assigned => resolved
2015-10-29 10:43 git Note Added: 0047575
2015-10-29 10:45 kgv Note Added: 0047577
2015-10-29 10:45 kgv Assigned To kgv => bugmaster
2015-10-29 10:45 kgv Status resolved => reviewed
2015-10-29 16:00 mkv Assigned To bugmaster => mkv
2015-10-29 17:30 mkv Test case number => Not needed
2015-10-29 18:48 git Note Added: 0047628
2015-10-30 15:09 mkv Note Added: 0047654
2015-10-30 15:09 mkv Note Added: 0047655
2015-10-30 15:10 mkv Note Added: 0047656
2015-10-30 15:10 mkv Assigned To mkv => bugmaster
2015-10-30 15:10 mkv Status reviewed => tested
2015-11-06 12:35 bugmaster Changeset attached => occt master c85385c0
2015-11-06 12:35 bugmaster Status tested => verified
2015-11-06 12:35 bugmaster Resolution open => fixed
2016-04-17 14:26 git Note Added: 0053168
2016-04-17 14:26 git Note Added: 0053169
2016-04-20 15:42 aiv Fixed in Version => 7.0.0
2016-04-20 15:51 aiv Status verified => closed