Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RangeTable:48 sum_lengths not initialized #1086

Closed
DennisOSRM opened this issue Jun 16, 2014 · 1 comment
Closed

RangeTable:48 sum_lengths not initialized #1086

DennisOSRM opened this issue Jun 16, 2014 · 1 comment

Comments

@DennisOSRM
Copy link
Collaborator

This came thru Coverity scan: The default c'tor in RangeTable does not properly initialize member sum_lengths:

*** CID 1223038:  Uninitialized scalar field  (UNINIT_CTOR)
/tmp/Project-OSRM/DataStructures/RangeTable.h: 48 in RangeTable<(unsigned int)16, (bool)0>::RangeTable()()
42         typedef typename ShM<unsigned, USE_SHARED_MEMORY>::vector OffsetContainerT;
43         typedef decltype(boost::irange(0u,0u))                    RangeT;
44     
45         friend std::ostream& operator<< <>(std::ostream &out, const RangeTable &table);
46         friend std::istream& operator>> <>(std::istream &in, RangeTable &table);
47     
   CID 1223038:  Uninitialized scalar field  (UNINIT_CTOR)
   Non-static class member "sum_lengths" is not initialized in this constructor nor in any functions that it calls.
48         RangeTable() {}
49     
50         // for loading from shared memory
51         explicit RangeTable(OffsetContainerT& external_offsets, BlockContainerT& external_blocks, const unsigned sum_lengths)
52         : sum_lengths(sum_lengths)
53         {

cc: @TheMarex

@DennisOSRM
Copy link
Collaborator Author

@TheMarex ping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant