View Issue Details

IDProjectCategoryView StatusLast Update
0024087Open CASCADEOCCT:Codingpublic2013-12-19 13:56
ReporteromyAssigned Toomy 
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2008 
Product Version6.6.0 
Target Version6.7.0Fixed in Version6.7.0 
Summary0024087: Eliminate compiler warning C4244 in MSVC++ with warning level 4
DescriptionWhen 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
TagsNo tags attached.
Test case numberNot needed

Relationships

child of 0023947 closedomy Eliminate trivial compiler warnings in MSVC++ with warning level 4 

Activities

omy

2013-07-25 17:39

developer   ~0025161

Dear kgv,
Please, review the fixes made in branch CR24087.

kgv

2013-07-26 10:44

developer   ~0025165

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.

omy

2013-07-29 10:20

developer   ~0025181

Last edited: 2013-07-29 10:21

Dear kgv,
I've made the fixes you've mentioned.
Please, review.

kgv

2013-07-29 10:29

developer   ~0025182

Patch is ready for testing.

mkv

2013-07-30 16:00

tester   ~0025206

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.

Related Changesets

occt: master 8263fcd3

2013-07-29 06:27:34

omy

Details Diff
0024087: Eliminate compiler warning C4244 in MSVC++ with warning level 4

Most of the compiler warnings C4244 have been eliminated.
Affected Issues
0024087
mod - src/AdvApp2Var/AdvApp2Var_SysBase.cxx Diff File
mod - src/BinTools/BinTools_LocationSet.cxx Diff File
mod - src/DDataStd/DDataStd_BasicCommands.cxx Diff File
mod - src/Graphic3d/Graphic3d_ArrayOfPrimitives.lxx Diff File
mod - src/Interface/Interface_InterfaceModel.cxx Diff File
mod - src/IntPatch/IntPatch_PrmPrmIntersection.cxx Diff File
mod - src/LDOM/LDOM_OSStream.cxx Diff File
mod - src/MeshVS/MeshVS_NodalColorPrsBuilder.cxx Diff File
mod - src/OpenGl/OpenGl_GraduatedTrihedron.hxx Diff File
mod - src/OpenGl/OpenGl_View_2.cxx Diff File
mod - src/OpenGl/OpenGl_Window.cxx Diff File
mod - src/Resource/Resource_ConvertUnicode.c Diff File
mod - src/StepFile/recfile.pc Diff File
mod - src/ViewerTest/ViewerTest_ViewerCommands.cxx Diff File
mod - src/Voxel/Voxel_BooleanOperation.cxx Diff File
mod - src/Voxel/Voxel_Reader.cxx Diff File
mod - src/VrmlData/VrmlData_ShapeConvert.cxx Diff File

Issue History

Date Modified Username Field Change
2013-07-25 10:08 omy New Issue
2013-07-25 10:08 omy Assigned To => omy
2013-07-25 10:08 omy Status new => assigned
2013-07-25 10:09 omy Relationship added child of 0023947
2013-07-25 17:39 omy Note Added: 0025161
2013-07-25 17:39 omy Assigned To omy => kgv
2013-07-25 17:39 omy Status assigned => resolved
2013-07-26 10:44 kgv Note Added: 0025165
2013-07-26 10:44 kgv Assigned To kgv => omy
2013-07-26 10:44 kgv Status resolved => assigned
2013-07-29 10:20 omy Note Added: 0025181
2013-07-29 10:20 omy Assigned To omy => kgv
2013-07-29 10:20 omy Status assigned => resolved
2013-07-29 10:21 omy Note Edited: 0025181
2013-07-29 10:29 kgv Note Added: 0025182
2013-07-29 10:29 kgv Assigned To kgv => bugmaster
2013-07-29 10:29 kgv Status resolved => reviewed
2013-07-29 15:50 mkv Assigned To bugmaster => mkv
2013-07-30 16:00 mkv Note Added: 0025206
2013-07-30 16:01 mkv Test case number => Not needed
2013-07-30 16:01 mkv Assigned To mkv => bugmaster
2013-07-30 16:01 mkv Status reviewed => tested
2013-08-02 13:20 omy Changeset attached => occt master 8263fcd3
2013-08-02 13:20 omy Assigned To bugmaster => omy
2013-08-02 13:20 omy Status tested => verified
2013-08-02 13:20 omy Resolution open => fixed
2013-12-19 13:52 bugmaster Status verified => closed
2013-12-19 13:56 bugmaster Fixed in Version => 6.7.0
2014-01-11 11:58 abv Category OCCT Release:BUILD => OCCT:Coding