MantisBT - Open CASCADE
View Issue Details
0024087Open CASCADE[OCCT] OCCT:Codingpublic2013-07-25 10:082013-12-19 13:56
omy 
omy 
normalminor 
closedfixed 
WindowsVC++ 200832 bit
[OCCT] 6.6.0 
[OCCT] 6.7.0[OCCT] 6.7.0 
Not needed
0024087: Eliminate compiler warning C4244 in MSVC++ with warning level 4
When compiling OCCT 6.6.0 with warning level set to 4, MSVC 2008 compiler produces many warnings c4244: conversion from 'X' to 'Y'. Possible loss of data
No tags attached.
child of 0023947closed omy Eliminate trivial compiler warnings in MSVC++ with warning level 4 
Issue History
2013-07-25 10:08omyNew Issue
2013-07-25 10:08omyAssigned To => omy
2013-07-25 10:08omyStatusnew => assigned
2013-07-25 10:09omyRelationship addedchild of 0023947
2013-07-25 17:39omyNote Added: 0025161
2013-07-25 17:39omyAssigned Toomy => kgv
2013-07-25 17:39omyStatusassigned => resolved
2013-07-26 10:44kgvNote Added: 0025165
2013-07-26 10:44kgvAssigned Tokgv => omy
2013-07-26 10:44kgvStatusresolved => assigned
2013-07-29 10:20omyNote Added: 0025181
2013-07-29 10:20omyAssigned Toomy => kgv
2013-07-29 10:20omyStatusassigned => resolved
2013-07-29 10:21omyNote Edited: 0025181bug_revision_view_page.php?bugnote_id=25181#r5672
2013-07-29 10:29kgvNote Added: 0025182
2013-07-29 10:29kgvAssigned Tokgv => bugmaster
2013-07-29 10:29kgvStatusresolved => reviewed
2013-07-29 15:50mkvAssigned Tobugmaster => mkv
2013-07-30 16:00mkvNote Added: 0025206
2013-07-30 16:01mkvTest case number => Not needed
2013-07-30 16:01mkvAssigned Tomkv => bugmaster
2013-07-30 16:01mkvStatusreviewed => tested
2013-08-02 13:20omyChangeset attached => occt master 8263fcd3
2013-08-02 13:20omyAssigned Tobugmaster => omy
2013-08-02 13:20omyStatustested => verified
2013-08-02 13:20omyResolutionopen => fixed
2013-12-19 13:52bugmasterStatusverified => closed
2013-12-19 13:56bugmasterFixed in Version => 6.7.0
2014-01-11 11:58abvCategoryOCCT Release:BUILD => OCCT:Coding

Notes
(0025161)
omy   
2013-07-25 17:39   
Dear kgv,
Please, review the fixes made in branch CR24087.
(0025165)
kgv   
2013-07-26 10:44   
Dear omy, here are my suggestions:

In function DDataStd_SetByteArray:
>    for(Standard_Integer i = From; i<=To; i++) {
>      Standard_Integer ival = Draw::Atoi(arg[j]);
>      if(ival > 255) {
>	cout << "Bad value = " << ival<< endl;
>	return 1;
>      }
>      A->SetValue(i, (Standard_Byte)ival); 
>      j++;
>    }

According to content of other functions ival should be checked for negative values as well.

/*static*/ int ViewerMainLoop(Standard_Integer argc, const char** argv)

Please avoid commenting code - remove it when reasonable.
(0025181)
omy   
2013-07-29 10:20   
(edited on: 2013-07-29 10:21)
Dear kgv,
I've made the fixes you've mentioned.
Please, review.

(0025182)
kgv   
2013-07-29 10:29   
Patch is ready for testing.
(0025206)
mkv   
2013-07-30 16:00   
Dear BugMaster,

Branch CR24087 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: 277c90ad1ba1fa18de3c22b6cf64f6ca5ccaf443

Number of compiler warnings:

occt component :
Linux: 947 (953 on master)
Windows: 916 (958 on master)

products component :
Linux: 189 (189 on master)
Windows: 288 (288 on master)

Regressions:
No regressions

Improvements:
No improvements

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 362927312 / 363320812
Total CPU difference: 46169.74000000097 / 45478.66000000069

Testing on Windows:
Total MEMORY difference: 421890944 / 422579736
Total CPU difference: 39463.953125 / 41697.453125

There are not differences in images found by testdiff.