View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0024304 | Open CASCADE | OCCT:Coding | public | 2013-10-31 16:21 | 2013-12-19 13:59 |
Reporter | Assigned To | bugmaster | |||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Platform | Linux | OS | Debian 4.0 | ||
Product Version | 6.6.0 | ||||
Target Version | 6.7.0 | Fixed in Version | 6.7.0 | ||
Summary | 0024304: Eliminate GCC compiler warning about exceeding maximum value for type in case label | ||||
Description | Eliminate GCC compiler warning "case label value exceeds maximum value for type" | ||||
Tags | No tags attached. | ||||
Test case number | Not needed | ||||
|
The current version actually disables signal handler in case if siginfo is not available. I believe existing implementation can be kept if this function is properly used as signal handler, since in this case it will always get signum as first argument (see docs on sigaction() et al.). However, the current implementation of handlers is senseless: they are declared as class members while used as plain C functions (with explicit cast). I suggest that methods OSD::Handler(), OSD::SegvHandler(), OSD::WntHandler() should be removed from class members and made static const functions in CXX file, with signature as expected by sigaction() or other signal function used. This will allow using it without explicit cast, and protect against misuse. Enum OSD_Signals should be removed as it is not used anywhere. |
|
Methods OSD::Handler(), OSD::SegvHandler(), OSD::WntHandler() were made static. testing case bugs / fclasses / bug6143 is OK on the Debian6.0-64 and on Windows vc9 win32 release. Testing on Windows vc9 win64 Debug is impossible due to bug 0024255. Changes are located in branch CR24304. Please, review. |
|
In OSD_SetSignal.cxx: - switch by aSigInfo->si_code near lines 197 and 310, and if (fFltExceptions) on line 247: please keep action on separate line -- it is easier to see and to debug - line 252: please remove "if (aSigInfo)" (artifact of previous fix), the switch should use theSigNum arument - line 404: WntHandler() is not needed any more on Linux - in all OSD_Signal*cxx: when pointer on signal handler function is used, please remove type cast and check that compiler does not complain |
|
Remarks were applied. Also, type cast for function SIGWntHandler was removed, it seems that second argument is never used. Changes are located in branch CR24304. Please, review. |
|
I have restored FPE handlers and rebased on IR-2013-11-28; patch is ready for testing in branch CR24304_1. Please check compilation on Linux first of all. |
|
Dear BugMaster, Branch CR24304_1 (and products from GIT master) was compiled on Linux and Windows platforms and tested. SHA-1: 21403afd442ef0b60543b4407df8173bca5157fb Number of compiler warnings: occt component : Linux: 101 (103 on master) Windows: 0 (0 on master) products component : Linux: 188 (188 on master) Windows: 237 (237 on master) Regressions/Differences: No regressions/differences Testing cases: Not needed Testing on Linux: Total MEMORY difference: 358043456 / 358548328 Total CPU difference: 42023.78000000015 / 45680.00000000018 Testing on Windows: Total MEMORY difference: 413174476 / 412528388 Total CPU difference: 32482.046875 / 33996.0625 There are not differences in images found by testdiff. |
occt: master 89c4bca8 2013-11-28 14:10:25
Committer: bugmaster Details Diff |
0024304: Eliminate GCC compiler warning about exceeding maximum value for type in case label Methods OSD::Handler(), OSD::SegvHandler(), OSD::WntHandler() were made static Type cast were removed when pointer on signal handler function is used Enumeration OSD_Signal removed |
Affected Issues 0024304 |
|
mod - src/OSD/OSD.cdl | Diff File | ||
mod - src/OSD/OSD.cxx | Diff File | ||
mod - src/OSD/OSD_signal.cxx | Diff File | ||
mod - src/OSD/OSD_signal_WNT.cxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-10-31 16:21 |
|
New Issue | |
2013-10-31 16:21 |
|
Assigned To | => ski |
2013-10-31 16:22 |
|
Status | new => assigned |
2013-11-08 17:23 |
|
Assigned To | ski => abv |
2013-11-08 17:23 |
|
Status | assigned => resolved |
2013-11-18 06:33 |
|
Note Added: 0026678 | |
2013-11-18 06:33 |
|
Assigned To | abv => ski |
2013-11-18 06:33 |
|
Status | resolved => assigned |
2013-11-27 13:58 |
|
Note Added: 0026959 | |
2013-11-27 13:58 |
|
Assigned To | ski => abv |
2013-11-27 13:58 |
|
Status | assigned => resolved |
2013-11-27 14:23 |
|
Note Added: 0026962 | |
2013-11-27 14:23 |
|
Assigned To | abv => ski |
2013-11-27 14:23 |
|
Status | resolved => assigned |
2013-11-28 17:07 |
|
Note Added: 0026986 | |
2013-11-28 17:07 |
|
Assigned To | ski => abv |
2013-11-28 17:07 |
|
Status | assigned => resolved |
2013-11-29 09:20 |
|
Note Added: 0026990 | |
2013-11-29 09:20 |
|
Assigned To | abv => bugmaster |
2013-11-29 09:20 |
|
Status | resolved => reviewed |
2013-11-29 11:25 |
|
Assigned To | bugmaster => mkv |
2013-12-03 08:22 |
|
Note Added: 0027034 | |
2013-12-03 08:22 |
|
Test case number | => Not needed |
2013-12-03 08:22 |
|
Assigned To | mkv => bugmaster |
2013-12-03 08:22 |
|
Status | reviewed => tested |
2013-12-06 17:57 | bugmaster | Changeset attached | => occt master 89c4bca8 |
2013-12-06 17:57 | bugmaster | Status | tested => verified |
2013-12-06 17:57 | bugmaster | Resolution | open => fixed |
2013-12-09 12:04 | bugmaster | Target Version | => 6.7.0 |
2013-12-19 13:50 | bugmaster | Status | verified => closed |
2013-12-19 13:59 | bugmaster | Fixed in Version | => 6.7.0 |
2014-01-11 11:58 |
|
Category | OCCT Release:BUILD => OCCT:Coding |