Add in-class initializers for t_placer_costs to fix coverity scan defect #1557
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fix Coverity Scan for t_placer_costs in place_util.h.
Original report:
Please find the latest report on new defect(s) introduced to Verilog to Routing found with Coverity Scan.
1 new defect(s) introduced to Verilog to Routing found with Coverity Scan.
1 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)
** CID 214341: Uninitialized members (UNINIT_CTOR)
/home/travis/build/verilog-to-routing/vtr-verilog-to-routing/vpr/src/place/place_util.h: 51 in t_placer_costs::t_placer_costs(t_place_algorithm)()
*** CID 214341: Uninitialized members (UNINIT_CTOR)
/home/travis/build/verilog-to-routing/vtr-verilog-to-routing/vpr/src/place/place_util.h: 51 in t_placer_costs::t_placer_costs(t_place_algorithm)()
45 double timing_cost;
46 double bb_cost_norm;
47 double timing_cost_norm;
48
49 public: //Constructor
50 t_placer_costs(t_place_algorithm algo)
51 : place_algorithm(algo) {}
52
53 public: //Mutator
54 void update_norm_factors();
55
56 private:
Types of changes