Skip to content

Commit

Permalink
Fixed uninitialized variable warning (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
richardrouil committed Oct 20, 2021
1 parent d4807b2 commit 2132599
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/lte/model/lte-sl-pool.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ class SidelinkCommResourcePool : public Object
/** Identify the location of a subframe by its frame number and subframe number */
struct SubframeInfo
{
uint32_t frameNo; ///< The frame number
uint32_t subframeNo; ///< The subframe number
uint32_t frameNo {std::numeric_limits <uint32_t>::max ()}; ///< The frame number
uint32_t subframeNo {std::numeric_limits <uint32_t>::max ()}; ///< The subframe number

/**
* Adds two subframe locations and return the new location
Expand Down
2 changes: 1 addition & 1 deletion src/lte/model/rr-sl-ff-mac-scheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ class RrSlFfMacScheduler : public FfMacScheduler
Ptr<SidelinkCommResourcePool> m_pool; ///< the pool
SidelinkCommResourcePool::SubframeInfo m_currentScPeriod; ///< start of current period
SidelinkCommResourcePool::SubframeInfo m_nextScPeriod; ///< start of next period
uint32_t m_npscch; ///< number of PSCCH available in the pool
uint32_t m_npscch = 0; ///< number of PSCCH available in the pool

std::map <uint16_t,uint32_t> m_ceSlBsrRxed; ///< map the RNTI and Sidelink BSR request

Expand Down
4 changes: 2 additions & 2 deletions src/lte/test/test-sidelink-comm-pool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,8 @@ void SidelinkCommPoolSubframeOpportunityTestCase::DoRun ()

bool flag = true;
int ctr = 0;
int32_t actualPscchSubframeOp1;
int32_t actualPscchSubframeOp2;
int32_t actualPscchSubframeOp1 = -1;
int32_t actualPscchSubframeOp2 = -1;

if (rbs.size () > 0)
{
Expand Down

0 comments on commit 2132599

Please sign in to comment.