|
Bugzilla – Full Text Bug Listing |
| Summary: | dead assignment on wifi mac-low | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | natale.patriciello |
| Component: | wifi | Assignee: | sebastien.deronne |
| Status: | RESOLVED FIXED | ||
| Severity: | enhancement | CC: | ns-bugs |
| Priority: | P5 | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: | patch | ||
Natale, this will provide the same output right? But I guess this is better as you propose. But I am a bit confused by the title of this bug though ... In fact a dead assignment triggered the error on the static analyzer, but I have corrected it by using that value, rather than removing the useless assignment. Just before the log statement, the variable currentSequenceNumber has been assigned the value peek'd from the header, but then in the log statement is peek'd again the value from the header. currentSequenceNumber, later in the code, is overwritten with another value; this lead to the dead assignment error. The patch uses the variable in the log statement instead of peeking again the value. Note that I'm not sure if the value currentSequenceNumber should be used somewhere else, or it was assigned just for logging purpose. OK to push changeset 12394:b41f53199fc5 |
Created attachment 2660 [details] patch Very simple case, but please check if the variable (that now is read inside the NS_LOG_DEBUG statement) should be used somewhere else. Without the log statement, the variable value is ignored.