Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(571)

Issue 333070043: Eliminate Visual Studio compiler warnings

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 months, 1 week ago by ammo6818-vandals.uidaho.edu
Modified:
3 months, 1 week ago
Reviewers:
S. Deronne
Visibility:
Public.

Description

Eliminate Visual Studio compiler warnings

Patch Set 1 #

Patch Set 2 : Corrections #

Patch Set 3 : Updates to use C++ style type casts #

Total comments: 102

Patch Set 4 : Updates for latest module changes #

Patch Set 5 : Updated patch to address review comments #

Total comments: 13

Patch Set 6 : Updates to patch set #

Patch Set 7 : Patch updates for x64 build #

Total comments: 19

Patch Set 8 : Patch updates for review comments and latest module changes #

Total comments: 73

Patch Set 9 : Updated patch for latest changes. #

Total comments: 47

Patch Set 10 : Update patch to remove or convert all NS_UNUSED references #

Patch Set 11 : Update patch per coding style requirements #

Patch Set 12 : Update patch with latest module changes #

Total comments: 9

Patch Set 13 : Patch updates for latest module changes #

Total comments: 52

Patch Set 14 : Updated patch for review comments and latest moduel changes. #

Patch Set 15 : Updates for latest module changes #

Total comments: 29

Patch Set 16 : Updates to address review comments #

Total comments: 17
Unified diffs Side-by-side diffs Delta from patch set Stats (+175 lines, -166 lines) Patch
M src/wifi/examples/wifi-manager-example.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +8 lines, -6 lines 0 comments Download
M src/wifi/examples/wifi-phy-configuration.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +5 lines, -0 lines 0 comments Download
M src/wifi/model/ap-wifi-mac.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +10 lines, -10 lines 1 comment Download
M src/wifi/model/aparf-wifi-manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +4 lines, -4 lines 1 comment Download
M src/wifi/model/block-ack-manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +6 lines, -6 lines 0 comments Download
M src/wifi/model/ctrl-headers.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M src/wifi/model/ctrl-headers.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -2 lines 0 comments Download
M src/wifi/model/dcf-manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -2 lines 0 comments Download
M src/wifi/model/edca-parameter-set.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 8 chunks +16 lines, -16 lines 0 comments Download
M src/wifi/model/ideal-wifi-manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 14 5 chunks +5 lines, -5 lines 1 comment Download
M src/wifi/model/mac-low.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 10 chunks +10 lines, -10 lines 6 comments Download
M src/wifi/model/mgt-headers.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +6 lines, -6 lines 0 comments Download
M src/wifi/model/minstrel-ht-wifi-manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
M src/wifi/model/minstrel-ht-wifi-manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 7 chunks +10 lines, -8 lines 0 comments Download
M src/wifi/model/minstrel-wifi-manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 7 chunks +11 lines, -11 lines 0 comments Download
M src/wifi/model/mpdu-aggregator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +3 lines, -3 lines 0 comments Download
M src/wifi/model/msdu-aggregator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M src/wifi/model/parf-wifi-manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -2 lines 0 comments Download
M src/wifi/model/regular-wifi-mac.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +3 lines, -3 lines 0 comments Download
M src/wifi/model/rraa-wifi-manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -2 lines 0 comments Download
M src/wifi/model/rrpaa-wifi-manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M src/wifi/model/spectrum-wifi-phy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
M src/wifi/model/spectrum-wifi-phy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +5 lines, -5 lines 1 comment Download
M src/wifi/model/supported-rates.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +5 lines, -5 lines 0 comments Download
M src/wifi/model/supported-rates.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +10 lines, -10 lines 1 comment Download
M src/wifi/model/wifi-mac-header.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M src/wifi/model/wifi-mac-queue-item.h View 1 2 3 4 5 6 7 8 9 10 11 12 0 chunks +-1 lines, --1 lines 0 comments Download
M src/wifi/model/wifi-mac-queue-item.cc View 1 2 3 4 5 6 7 8 9 10 0 chunks +-1 lines, --1 lines 0 comments Download
M src/wifi/model/wifi-mode.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -2 lines 1 comment Download
M src/wifi/model/wifi-net-device.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M src/wifi/model/wifi-phy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -2 lines 0 comments Download
M src/wifi/model/wifi-phy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 7 chunks +11 lines, -11 lines 0 comments Download
M src/wifi/model/wifi-phy-listener.h View 1 2 3 4 5 6 7 8 9 10 0 chunks +-1 lines, --1 lines 0 comments Download
M src/wifi/model/wifi-phy-state.h View 1 2 3 4 5 6 7 8 9 10 0 chunks +-1 lines, --1 lines 0 comments Download
M src/wifi/model/wifi-phy-tag.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 1 comment Download
M src/wifi/model/wifi-radio-energy-model.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +6 lines, -6 lines 1 comment Download
M src/wifi/model/wifi-remote-station-manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +6 lines, -6 lines 1 comment Download
M src/wifi/model/wifi-utils.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M src/wifi/model/yans-wifi-channel.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 1 comment Download
M src/wifi/test/dcf-manager-test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 8 chunks +11 lines, -11 lines 0 comments Download
M src/wifi/test/wifi-test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +6 lines, -6 lines 1 comment Download

Messages

Total messages: 34
S. Deronne
Robert, thanks for your huge work. I added some comments inline. I am also not ...
8 months ago (2017-12-17 15:39:16 UTC) #1
S. Deronne
https://codereview.appspot.com/333070043/diff/40001/src/wifi/model/ap-wifi-mac.cc File src/wifi/model/ap-wifi-mac.cc (left): https://codereview.appspot.com/333070043/diff/40001/src/wifi/model/ap-wifi-mac.cc#oldcode979 src/wifi/model/ap-wifi-mac.cc:979: { i should be coded on 8 bits to ...
8 months ago (2017-12-17 16:02:45 UTC) #2
S. Deronne
https://codereview.appspot.com/333070043/diff/40001/src/wifi/helper/athstats-helper.cc File src/wifi/helper/athstats-helper.cc (right): https://codereview.appspot.com/333070043/diff/40001/src/wifi/helper/athstats-helper.cc#newcode211 src/wifi/helper/athstats-helper.cc:211: NS_UNUSED(preamble); we can simply add preamble in the log ...
8 months ago (2017-12-17 16:18:27 UTC) #3
S. Deronne
https://codereview.appspot.com/333070043/diff/40001/src/wifi/model/dsss-parameter-set.cc File src/wifi/model/dsss-parameter-set.cc (right): https://codereview.appspot.com/333070043/diff/40001/src/wifi/model/dsss-parameter-set.cc#newcode22 src/wifi/model/dsss-parameter-set.cc:22: #include "ns3/unused.h" needed? https://codereview.appspot.com/333070043/diff/40001/src/wifi/model/edca-parameter-set.cc File src/wifi/model/edca-parameter-set.cc (right): https://codereview.appspot.com/333070043/diff/40001/src/wifi/model/edca-parameter-set.cc#newcode22 src/wifi/model/edca-parameter-set.cc:22: ...
8 months ago (2017-12-17 16:24:21 UTC) #4
S. Deronne
https://codereview.appspot.com/333070043/diff/40001/src/wifi/model/mac-low.cc File src/wifi/model/mac-low.cc (left): https://codereview.appspot.com/333070043/diff/40001/src/wifi/model/mac-low.cc#oldcode69 src/wifi/model/mac-low.cc:69: { why no unused needed for the duration? https://codereview.appspot.com/333070043/diff/40001/src/wifi/model/regular-wifi-mac.cc ...
8 months ago (2017-12-17 16:49:29 UTC) #5
S. Deronne
https://codereview.appspot.com/333070043/diff/40001/src/wifi/test/wifi-test.cc File src/wifi/test/wifi-test.cc (right): https://codereview.appspot.com/333070043/diff/40001/src/wifi/test/wifi-test.cc#newcode586 src/wifi/test/wifi-test.cc:586: NS_UNUSED(adr); adr can be removed https://codereview.appspot.com/333070043/diff/40001/src/wifi/test/wifi-test.cc#newcode1067 src/wifi/test/wifi-test.cc:1067: NS_UNUSED(adr); adr ...
8 months ago (2017-12-17 17:07:37 UTC) #6
S. Deronne
https://codereview.appspot.com/333070043/diff/40001/src/wifi/test/block-ack-test-suite.cc File src/wifi/test/block-ack-test-suite.cc (right): https://codereview.appspot.com/333070043/diff/40001/src/wifi/test/block-ack-test-suite.cc#newcode274 src/wifi/test/block-ack-test-suite.cc:274: for (uint16_t i = 179; i < 220; i++) ...
8 months ago (2017-12-17 17:14:58 UTC) #7
ammo6818-vandals.uidaho.edu
An updated patch has been uploaded to address your review comments. I have also replied ...
8 months ago (2017-12-20 04:16:35 UTC) #8
S. Deronne
Could you please provide an updated patch based on the latest ns-3-dev? As you might ...
7 months, 4 weeks ago (2017-12-22 22:28:28 UTC) #9
S. Deronne
https://codereview.appspot.com/333070043/diff/80001/src/wifi/examples/test-interference-helper.cc File src/wifi/examples/test-interference-helper.cc (right): https://codereview.appspot.com/333070043/diff/80001/src/wifi/examples/test-interference-helper.cc#newcode121 src/wifi/examples/test-interference-helper.cc:121: txVector.SetTxPowerLevel (static_cast<uint8_t>(m_input.txPowerLevelA)); this is not correct initially, they set ...
7 months, 4 weeks ago (2017-12-23 10:19:59 UTC) #10
ammo6818-vandals.uidaho.edu
Additional changes for your latest review comments. https://codereview.appspot.com/333070043/diff/40001/src/wifi/model/ap-wifi-mac.cc File src/wifi/model/ap-wifi-mac.cc (left): https://codereview.appspot.com/333070043/diff/40001/src/wifi/model/ap-wifi-mac.cc#oldcode979 src/wifi/model/ap-wifi-mac.cc:979: { On ...
7 months, 4 weeks ago (2017-12-23 15:14:33 UTC) #11
S. Deronne
Robert, am I really reviewing the latest patch set? I'd like to start to merge ...
6 months, 1 week ago (2018-02-08 20:53:31 UTC) #12
ammo6818-vandals.uidaho.edu
The review comments have been replied to or changes uploaded to address. https://codereview.appspot.com/333070043/diff/140001/src/wifi/examples/test-interference-helper.cc File src/wifi/examples/test-interference-helper.cc ...
6 months, 1 week ago (2018-02-11 19:41:06 UTC) #13
S. Deronne
I will start pushing what can be done already. My main concerns are still those ...
6 months ago (2018-02-16 21:24:33 UTC) #14
S. Deronne
I am starting to push some changes to ns-3-dev, please address my comments so that ...
6 months ago (2018-02-17 08:13:16 UTC) #15
S. Deronne
I pushed some changes to ns-3-dev already. Could you please update your patchset and address ...
6 months ago (2018-02-17 20:00:22 UTC) #16
ammo6818-vandals.uidaho.edu
Updated patch for latest changes uploaded. https://codereview.appspot.com/333070043/diff/40001/src/wifi/examples/test-interference-helper.cc File src/wifi/examples/test-interference-helper.cc (right): https://codereview.appspot.com/333070043/diff/40001/src/wifi/examples/test-interference-helper.cc#newcode121 src/wifi/examples/test-interference-helper.cc:121: txVector.SetTxPowerLevel (static_cast<int8_t>(m_input.txPowerLevelA)); On ...
6 months ago (2018-02-18 05:13:10 UTC) #17
S. Deronne
https://codereview.appspot.com/333070043/diff/140001/src/wifi/examples/test-interference-helper.cc File src/wifi/examples/test-interference-helper.cc (right): https://codereview.appspot.com/333070043/diff/140001/src/wifi/examples/test-interference-helper.cc#newcode251 src/wifi/examples/test-interference-helper.cc:251: uint64_t delay = 0; //microseconds OK, thanks. https://codereview.appspot.com/333070043/diff/140001/src/wifi/examples/wifi-manager-example.cc File ...
6 months ago (2018-02-18 07:44:41 UTC) #18
S. Deronne
https://codereview.appspot.com/333070043/diff/200001/src/wifi/examples/test-interference-helper.cc File src/wifi/examples/test-interference-helper.cc (right): https://codereview.appspot.com/333070043/diff/200001/src/wifi/examples/test-interference-helper.cc#newcode275 src/wifi/examples/test-interference-helper.cc:275: //LogComponentEnable ("SimpleFrameCaptureModel", LOG_LEVEL_ALL); I suggest to simply remove them ...
6 months ago (2018-02-18 08:06:44 UTC) #19
S. Deronne
I will continue to push. I still do not agree with all those NS_UNUSED. Please ...
6 months ago (2018-02-18 14:52:57 UTC) #20
ammo6818-vandals.uidaho.edu
I have uploaded an updated patch to incorporate all the module changes and to fix ...
5 months, 2 weeks ago (2018-03-05 23:17:08 UTC) #21
ammo6818-vandals.uidaho.edu
Patch has been updated with latest module changes.
5 months, 1 week ago (2018-03-14 02:41:23 UTC) #22
S. Deronne
https://codereview.appspot.com/333070043/diff/280001/src/wifi/test/dcf-manager-test.cc File src/wifi/test/dcf-manager-test.cc (left): https://codereview.appspot.com/333070043/diff/280001/src/wifi/test/dcf-manager-test.cc#oldcode390 src/wifi/test/dcf-manager-test.cc:390: { are those size_t needed because they are filled ...
4 months, 3 weeks ago (2018-03-27 10:53:35 UTC) #23
ammo6818-vandals.uidaho.edu
Patch has been updated with remaining files for the patch. https://codereview.appspot.com/333070043/diff/280001/src/wifi/test/dcf-manager-test.cc File src/wifi/test/dcf-manager-test.cc (left): https://codereview.appspot.com/333070043/diff/280001/src/wifi/test/dcf-manager-test.cc#oldcode390 ...
4 months, 3 weeks ago (2018-03-30 03:57:29 UTC) #24
S. Deronne
Thanks for the quick update. I am mainly doubting about all casts, I will still ...
4 months, 3 weeks ago (2018-03-30 06:29:51 UTC) #25
S. Deronne
Here are some additional comments. I cannot investigate myself right now since the setup is ...
4 months, 3 weeks ago (2018-03-30 06:56:55 UTC) #26
S. Deronne
Robert, could you update with the latest ns-3-dev and address my comments? Thanks.
4 months, 2 weeks ago (2018-04-03 20:34:11 UTC) #27
ammo6818-vandals.uidaho.edu
Updated patch for review comments and latest module changes. https://codereview.appspot.com/333070043/diff/300001/src/wifi/model/block-ack-manager.cc File src/wifi/model/block-ack-manager.cc (right): https://codereview.appspot.com/333070043/diff/300001/src/wifi/model/block-ack-manager.cc#newcode412 src/wifi/model/block-ack-manager.cc:412: ...
4 months, 2 weeks ago (2018-04-05 17:51:02 UTC) #28
S. Deronne
Thanks for the update. I am still convinced a lot of casts can be avoided, ...
4 months, 2 weeks ago (2018-04-05 19:46:50 UTC) #29
ammo6818-vandals.uidaho.edu
Patch has been updated with latest module changes.
3 months, 2 weeks ago (2018-05-03 02:52:47 UTC) #30
S. Deronne
Hi, Thanks, but could you also update the wireless examples? We are closer to a ...
3 months, 2 weeks ago (2018-05-03 19:09:18 UTC) #31
S. Deronne
https://codereview.appspot.com/333070043/diff/340001/src/wifi/examples/wifi-phy-configuration.cc File src/wifi/examples/wifi-phy-configuration.cc (right): https://codereview.appspot.com/333070043/diff/340001/src/wifi/examples/wifi-phy-configuration.cc#newcode23 src/wifi/examples/wifi-phy-configuration.cc:23: #include "ns3/wifi-module.h" ? https://codereview.appspot.com/333070043/diff/340001/src/wifi/model/block-ack-manager.cc File src/wifi/model/block-ack-manager.cc (right): https://codereview.appspot.com/333070043/diff/340001/src/wifi/model/block-ack-manager.cc#newcode415 src/wifi/model/block-ack-manager.cc:415: ...
3 months, 2 weeks ago (2018-05-03 21:47:23 UTC) #32
ammo6818-vandals.uidaho.edu
Updates to address latest review comments have been uploaded. https://codereview.appspot.com/333070043/diff/340001/src/wifi/examples/wifi-phy-configuration.cc File src/wifi/examples/wifi-phy-configuration.cc (right): https://codereview.appspot.com/333070043/diff/340001/src/wifi/examples/wifi-phy-configuration.cc#newcode23 src/wifi/examples/wifi-phy-configuration.cc:23: ...
3 months, 1 week ago (2018-05-07 15:05:55 UTC) #33
S. Deronne
3 months, 1 week ago (2018-05-11 14:46:06 UTC) #34
https://codereview.appspot.com/333070043/diff/340001/src/wifi/model/minstrel-...
File src/wifi/model/minstrel-ht-wifi-manager.cc (right):

https://codereview.appspot.com/333070043/diff/340001/src/wifi/model/minstrel-...
src/wifi/model/minstrel-ht-wifi-manager.cc:1603:
MinstrelHtWifiManager::CalculateEwmsd (double oldEwmsd, double currentProb,
double ewmaProb, double weight)
On 2018/05/07 15:05:54, ammo6818-vandals.uidaho.edu wrote:
> On 2018/05/03 21:47:21, S. Deronne wrote:
> > why double?
> 
> This is called with a parameter that is a double.  Matches the instance where
> this is called from.

OK, I am not sure this is correct to have it double in the code, but this needs
to be checked later with Matias. In the meantime, I will do that change.

https://codereview.appspot.com/333070043/diff/360001/src/wifi/model/ap-wifi-m...
File src/wifi/model/ap-wifi-mac.cc (right):

https://codereview.appspot.com/333070043/diff/360001/src/wifi/model/ap-wifi-m...
src/wifi/model/ap-wifi-mac.cc:478: edcaParameters.SetBeAifsn
(static_cast<uint8_t> (edca->GetAifsn ()));
maybe worth to check in the standard whether we can limit aifsn to uint8_t

https://codereview.appspot.com/333070043/diff/360001/src/wifi/model/aparf-wif...
File src/wifi/model/aparf-wifi-manager.cc (right):

https://codereview.appspot.com/333070043/diff/360001/src/wifi/model/aparf-wif...
src/wifi/model/aparf-wifi-manager.cc:164: station->m_prevRateIndex =
static_cast<uint8_t> (station->m_nSupported - 1);
I will change m_nSupported to uint8_t

https://codereview.appspot.com/333070043/diff/360001/src/wifi/model/ideal-wif...
File src/wifi/model/ideal-wifi-manager.cc (right):

https://codereview.appspot.com/333070043/diff/360001/src/wifi/model/ideal-wif...
src/wifi/model/ideal-wifi-manager.cc:128: txVector.SetChannelWidth
(static_cast<uint8_t> (j));
SetChannelWidth expects uint16_t

https://codereview.appspot.com/333070043/diff/360001/src/wifi/model/mac-low.cc
File src/wifi/model/mac-low.cc (right):

https://codereview.appspot.com/333070043/diff/360001/src/wifi/model/mac-low.c...
src/wifi/model/mac-low.cc:522: for (uint32_t i = 0; i < sentMpdus; i++)
why?

https://codereview.appspot.com/333070043/diff/360001/src/wifi/model/mac-low.c...
src/wifi/model/mac-low.cc:1248: uint8_t queueSize = static_cast<uint8_t>
(m_aggregateQueue[GetTid (packet, *hdr)]->GetNPackets ());
I suggest to change type of queueSize

https://codereview.appspot.com/333070043/diff/360001/src/wifi/model/mac-low.c...
src/wifi/model/mac-low.cc:1383: uint8_t nTxMpdus = static_cast<uint8_t>
(m_aggregateQueue[tid]->GetNPackets ());
I am facing a dilemma: or we change type of nTxMpdus (+ the needed functions),
or we accept casts. What is the preferred solution of other reviewers?

https://codereview.appspot.com/333070043/diff/360001/src/wifi/model/mac-low.c...
src/wifi/model/mac-low.cc:2329: if (!edcaIt->second->GetMpduAggregator
()->CanBeAggregated (peekedPacket->GetSize () + peekedHdr.GetSize () +
WIFI_MAC_FCS_LENGTH, aggregatedPacket, static_cast<uint8_t> (size)))
size could become uint8_t, I'll give a try.

https://codereview.appspot.com/333070043/diff/360001/src/wifi/model/mac-low.c...
src/wifi/model/mac-low.cc:2409: blockAckSize = static_cast<uint16_t>
(packet->GetSize () + hdr.GetSize () + WIFI_MAC_FCS_LENGTH);
unavoidable?

https://codereview.appspot.com/333070043/diff/360001/src/wifi/model/mac-low.c...
src/wifi/model/mac-low.cc:2594: ampdutag.SetRemainingNbOfMpdus
(static_cast<uint8_t> (i - 1));
I guess we could change i to uint8_t

https://codereview.appspot.com/333070043/diff/360001/src/wifi/model/spectrum-...
File src/wifi/model/spectrum-wifi-phy.cc (right):

https://codereview.appspot.com/333070043/diff/360001/src/wifi/model/spectrum-...
src/wifi/model/spectrum-wifi-phy.cc:337: Ptr<SpectrumValue> txPowerSpectrum =
GetTxPowerSpectralDensity (static_cast<uint16_t>
(GetCenterFrequencyForChannelWidth (txVector)), txVector.GetChannelWidth (),
txPowerWatts, txVector.GetMode ().GetModulationClass ());
GetCenterFrequencyForChannelWidth already return uint16_t => cast not needed

https://codereview.appspot.com/333070043/diff/360001/src/wifi/model/supported...
File src/wifi/model/supported-rates.cc (left):

https://codereview.appspot.com/333070043/diff/360001/src/wifi/model/supported...
src/wifi/model/supported-rates.cc:152: if ((bs & 0x7f) ==
BSS_MEMBERSHIP_SELECTOR_HT_PHY
I see some functions still using uint32_t, like GetRate, I feel some
inconsistencies here...

https://codereview.appspot.com/333070043/diff/360001/src/wifi/model/wifi-mode.cc
File src/wifi/model/wifi-mode.cc (right):

https://codereview.appspot.com/333070043/diff/360001/src/wifi/model/wifi-mode...
src/wifi/model/wifi-mode.cc:165: uint32_t numberOfBitsPerSubcarrier =
static_cast<uint32_t> (log2 (GetConstellationSize ()));
an alternative is to declare it double, but it physically has no sense, so I am
here in favor or a cast. I am note sure though uint32_t is realistic, I think we
can reduce this to uint16_t.

https://codereview.appspot.com/333070043/diff/360001/src/wifi/model/wifi-phy-...
File src/wifi/model/wifi-phy-tag.cc (right):

https://codereview.appspot.com/333070043/diff/360001/src/wifi/model/wifi-phy-...
src/wifi/model/wifi-phy-tag.cc:50: i.WriteU16 (static_cast<uint16_t>
(m_mpduType));
OK, no other choice also here

https://codereview.appspot.com/333070043/diff/360001/src/wifi/model/wifi-radi...
File src/wifi/model/wifi-radio-energy-model.cc (right):

https://codereview.appspot.com/333070043/diff/360001/src/wifi/model/wifi-radi...
src/wifi/model/wifi-radio-energy-model.cc:320: remainingTime = NanoSeconds
(static_cast<uint64_t> (1e9 * (remainingEnergy / (m_sleepCurrentA *
supplyVoltage))));
indeed, if it expects uint64_t, I think we should keep those casts. The other
solution to use everywhere uint64_t for the variables is not a correct solution
to me, so I do not see other alternatives.

https://codereview.appspot.com/333070043/diff/360001/src/wifi/model/wifi-remo...
File src/wifi/model/wifi-remote-station-manager.cc (right):

https://codereview.appspot.com/333070043/diff/360001/src/wifi/model/wifi-remo...
src/wifi/model/wifi-remote-station-manager.cc:1931: return static_cast<uint8_t>
(m_bssBasicMcsSet.size ());
I tend to agree with this cast

https://codereview.appspot.com/333070043/diff/360001/src/wifi/model/yans-wifi...
File src/wifi/model/yans-wifi-channel.cc (right):

https://codereview.appspot.com/333070043/diff/360001/src/wifi/model/yans-wifi...
src/wifi/model/yans-wifi-channel.cc:134: return static_cast<uint32_t>
(m_phyList.size ());
I suggest to return size_t, and to adapt all base classes.

https://codereview.appspot.com/333070043/diff/360001/src/wifi/test/wifi-test.cc
File src/wifi/test/wifi-test.cc (right):

https://codereview.appspot.com/333070043/diff/360001/src/wifi/test/wifi-test....
src/wifi/test/wifi-test.cc:1256: for (unsigned int i = 0; i < numPackets; i++)
I do not understand why we need this change, we even do not use the i later on
in the for loop.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b