View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0032900 | Open CASCADE | PRODUCTS:Coding | public | 2022-04-02 11:07 | 2023-03-19 22:31 |
Reporter | kgv | Assigned To | bugmaster | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 7.6.0 | ||||
Target Version | 7.7.0 | Fixed in Version | 7.6.3 | ||
Summary | 0032900: Coding Rules - eliminate GCC9 compiler warnings -Wclass-memaccess in RWPointCloud_PointFilter.hxx | ||||
Description | The following GCC9 warning should be suppressed:In file included from /disk1/builds/CR0-WEEK-10/Ubuntu-2004-64-opt-c11/Products/inc/SparsePP.hxx:1, from /disk1/builds/CR0-WEEK-10/Products_SRC/src/RWPointCloud/RWPointCloud_PointFilter.hxx:32, from /disk1/builds/CR0-WEEK-10/Ubuntu-2004-64-opt-c11/Products/inc/RWPointCloud_PointFilter.hxx:1, from /disk1/builds/CR0-WEEK-10/Products_SRC/src/RWPointCloud/RWPointCloud_PointFilter.cxx:18: /disk1/builds/CR0-WEEK-10/Products_SRC/src/RWPointCloud/SparsePP.hxx: In instantiation of 'void spp::sparsetable<T, Alloc>::resize(spp::sparsetable<T, Alloc>::size_type) [with T = std::pair<long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > >; Alloc = spp::libc_allocator_with_realloc<std::pair<long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > > >; spp::sparsetable<T, Alloc>::size_type = long unsigned int]': /disk1/builds/CR0-WEEK-10/Products_SRC/src/RWPointCloud/SparsePP.hxx:4138:25: required from 'void spp::sparse_hashtable<Value, Key, HashFcn, ExtractKey, SetKey, EqualKey, Alloc>::_move_from(spp::sparse_hashtable<Value, Key, HashFcn, ExtractKey, SetKey, EqualKey, Alloc>::MoveDontCopyT, spp::sparse_hashtable<Value, Key, HashFcn, ExtractKey, SetKey, EqualKey, Alloc>&, spp::sparse_hashtable<Value, Key, HashFcn, ExtractKey, SetKey, EqualKey, Alloc>::size_type) [with Value = std::pair<long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > >; Key = long int; HashFcn = spp::spp_hash<long int>; ExtractKey = spp::sparse_hash_map<long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > >::SelectKey; SetKey = spp::sparse_hash_map<long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > >::SetKey; EqualKey = std::equal_to<long int>; Alloc = spp::libc_allocator_with_realloc<std::pair<const long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > > >; spp::sparse_hashtable<Value, Key, HashFcn, ExtractKey, SetKey, EqualKey, Alloc>::size_type = long unsigned int]' /disk1/builds/CR0-WEEK-10/Products_SRC/src/RWPointCloud/SparsePP.hxx:4285:9: required from 'spp::sparse_hashtable<Value, Key, HashFcn, ExtractKey, SetKey, EqualKey, Alloc>::sparse_hashtable(spp::sparse_hashtable<Value, Key, HashFcn, ExtractKey, SetKey, EqualKey, Alloc>::MoveDontCopyT, spp::sparse_hashtable<Value, Key, HashFcn, ExtractKey, SetKey, EqualKey, Alloc>&, spp::sparse_hashtable<Value, Key, HashFcn, ExtractKey, SetKey, EqualKey, Alloc>::size_type) [with Value = std::pair<long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > >; Key = long int; HashFcn = spp::spp_hash<long int>; ExtractKey = spp::sparse_hash_map<long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > >::SelectKey; SetKey = spp::sparse_hash_map<long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > >::SetKey; EqualKey = std::equal_to<long int>; Alloc = spp::libc_allocator_with_realloc<std::pair<const long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > > >; spp::sparse_hashtable<Value, Key, HashFcn, ExtractKey, SetKey, EqualKey, Alloc>::size_type = long unsigned int]' /disk1/builds/CR0-WEEK-10/Products_SRC/src/RWPointCloud/SparsePP.hxx:4077:26: required from 'bool spp::sparse_hashtable<Value, Key, HashFcn, ExtractKey, SetKey, EqualKey, Alloc>::_resize_delta(spp::sparse_hashtable<Value, Key, HashFcn, ExtractKey, SetKey, EqualKey, Alloc>::size_type) [with Value = std::pair<long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > >; Key = long int; HashFcn = spp::spp_hash<long int>; ExtractKey = spp::sparse_hash_map<long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > >::SelectKey; SetKey = spp::sparse_hash_map<long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > >::SetKey; EqualKey = std::equal_to<long int>; Alloc = spp::libc_allocator_with_realloc<std::pair<const long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > > >; spp::sparse_hashtable<Value, Key, HashFcn, ExtractKey, SetKey, EqualKey, Alloc>::size_type = long unsigned int]' /disk1/builds/CR0-WEEK-10/Products_SRC/src/RWPointCloud/SparsePP.hxx:4565:9: required from 'std::pair<typename spp::sparsetable<Value, typename Alloc::rebind<Value>::other>::ne_iterator, bool> spp::sparse_hashtable<Value, Key, HashFcn, ExtractKey, SetKey, EqualKey, Alloc>::insert(spp::sparse_hashtable<Value, Key, HashFcn, ExtractKey, SetKey, EqualKey, Alloc>::const_reference) [with Value = std::pair<long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > >; Key = long int; HashFcn = spp::spp_hash<long int>; ExtractKey = spp::sparse_hash_map<long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > >::SelectKey; SetKey = spp::sparse_hash_map<long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > >::SetKey; EqualKey = std::equal_to<long int>; Alloc = spp::libc_allocator_with_realloc<std::pair<const long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > > >; typename spp::sparsetable<Value, typename Alloc::rebind<Value>::other>::ne_iterator = spp::Two_d_iterator<std::pair<long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > >, spp::sparsegroup<std::pair<long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > >, spp::libc_allocator_with_realloc<std::pair<long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > > > >*, std::pair<const long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > >*, std::bidirectional_iterator_tag>; spp::sparse_hashtable<Value, Key, HashFcn, ExtractKey, SetKey, EqualKey, Alloc>::const_reference = const std::pair<const long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > >&; spp::sparse_hashtable<Value, Key, HashFcn, ExtractKey, SetKey, EqualKey, Alloc>::value_type = std::pair<const long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > >]' /disk1/builds/CR0-WEEK-10/Products_SRC/src/RWPointCloud/SparsePP.hxx:5168:73: required from 'std::pair<typename spp::sparse_hashtable<std::pair<typename spp::remove_const<Key>::type, T>, Key, HashFcn, spp::sparse_hash_map<Key, T, HashFcn, EqualKey, Alloc>::SelectKey, spp::sparse_hash_map<Key, T, HashFcn, EqualKey, Alloc>::SetKey, EqualKey, Alloc>::iterator, bool> spp::sparse_hash_map<Key, T, HashFcn, EqualKey, Alloc>::insert(const value_type&) [with Key = long int; T = std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > >; HashFcn = spp::spp_hash<long int>; EqualKey = std::equal_to<long int>; Alloc = spp::libc_allocator_with_realloc<std::pair<const long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > > >; typename spp::sparse_hashtable<std::pair<typename spp::remove_const<Key>::type, T>, Key, HashFcn, spp::sparse_hash_map<Key, T, HashFcn, EqualKey, Alloc>::SelectKey, spp::sparse_hash_map<Key, T, HashFcn, EqualKey, Alloc>::SetKey, EqualKey, Alloc>::iterator = spp::Two_d_iterator<std::pair<long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > >, spp::sparsegroup<std::pair<long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > >, spp::libc_allocator_with_realloc<std::pair<long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > > > >*, std::pair<const long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > >*, std::bidirectional_iterator_tag>; spp::sparse_hash_map<Key, T, HashFcn, EqualKey, Alloc>::value_type = std::pair<const long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > >]' /disk1/builds/CR0-WEEK-10/Products_SRC/src/RWPointCloud/RWPointCloud_PointFilter.cxx:177:91: required from here /disk1/builds/CR0-WEEK-10/Products_SRC/src/RWPointCloud/SparsePP.hxx:3363:23: warning: 'void* memcpy(void*, const void*, size_t)' writing to an object of type 'spp::sparsetable<std::pair<long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > >, spp::libc_allocator_with_realloc<std::pair<long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > > > >::group_type' {aka 'class spp::sparsegroup<std::pair<long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > >, spp::libc_allocator_with_realloc<std::pair<long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > > > >'} with no trivial copy-assignment; use copy-initialization instead [-Wclass-memaccess] 3363 | memcpy(first, _first_group, sizeof(*first) * (std::min)(sz, old_sz)); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /disk1/builds/CR0-WEEK-10/Products_SRC/src/RWPointCloud/SparsePP.hxx:2310:7: note: 'spp::sparsetable<std::pair<long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > >, spp::libc_allocator_with_realloc<std::pair<long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > > > >::group_type' {aka 'class spp::sparsegroup<std::pair<long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > >, spp::libc_allocator_with_realloc<std::pair<long int, std::vector<NCollection_Vec3<float>, std::allocator<NCollection_Vec3<float> > > > > >'} declared here 2310 | class sparsegroup | ^~~~~~~~~~~ | ||||
Steps To Reproduce | N/A | ||||
Tags | No tags attached. | ||||
Test case number | N/A | ||||
|
Please raise the patch - OCC Products: branch CR32900. http://jenkins-test-occt/view/master-CR32900-KGV/view/PRODUCTS%20compile/ |
|
Combination - OCCT branch : IR-2022-04-08 master SHA - 7021de2fe7a69d4c788ccf43b8b096dbcc8597c8 49e51745631c52b6c452c65adae4d6dfa21a1b1e Products branch : IR-2022-04-08 SHA - e16d959d441765c483049307ba7293173532103a was compiled on Linux, MacOS and Windows platforms and tested in optimize mode. Number of compiler warnings: No new/fixed warnings Regressions/Differences/Improvements: No regressions/differences CPU differences: Debian80-64: OCCT Total CPU difference: 18452.87000000039 / 18490.94000000032 [-0.21%] Products Total CPU difference: 11761.310000000152 / 11719.920000000124 [+0.35%] Windows-64-VC14: OCCT Total CPU difference: 20539.828125 / 20552.71875 [-0.06%] Products Total CPU difference: 13248.21875 / 13242.609375 [+0.04%] Image differences : No differences that require special attention Memory differences : No differences that require special attention |
Date Modified | Username | Field | Change |
---|---|---|---|
2022-04-02 11:07 | kgv | New Issue | |
2022-04-02 11:07 | kgv | Assigned To | => kgv |
2022-04-02 11:43 | kgv | Relationship added | child of 0032889 |
2022-04-02 12:26 | kgv | Note Added: 0107558 | |
2022-04-02 12:26 | kgv | Assigned To | kgv => bugmaster |
2022-04-02 12:26 | kgv | Status | new => resolved |
2022-04-02 12:26 | kgv | Steps to Reproduce Updated | |
2022-04-02 12:26 | kgv | Test case number | => N/A |
2022-04-02 12:26 | kgv | Status | resolved => reviewed |
2022-04-09 09:49 |
|
Status | reviewed => tested |
2022-04-09 09:49 |
|
Note Added: 0107781 | |
2022-04-10 10:42 | kgv | Changeset attached | => occt-products master 3571e7a0 |
2022-04-10 10:42 | kgv | Assigned To | bugmaster => kgv |
2022-04-10 10:42 | kgv | Status | tested => verified |
2022-04-10 10:42 | kgv | Resolution | open => fixed |
2022-10-19 15:47 |
|
Assigned To | kgv => vpozdyayev |
2022-10-25 17:21 |
|
Assigned To | vpozdyayev => bugmaster |
2023-03-19 22:31 | vglukhik | Status | verified => closed |
2023-03-19 22:31 | vglukhik | Fixed in Version | => 7.6.3 |