Closed Bug 1308871 Opened 3 years ago Closed 3 years ago

[Static Analysis][Logically dead code] In function nsXMLContentSerializer::SerializeAttr

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: andi, Assigned: andi)

References

(Blocks 1 open bug)

Details

(Keywords: coverity, Whiteboard: CID 1373492)

Attachments

(1 file)

The Static Analysis tool Coverity detected that the following statement will never evaluate to true: 

>>      if (bIncludesDouble && bIncludesSingle) {
>>        break;
>>      }

This is indeed true because of the following previous statements:

>>      if (*iCurr == char16_t('\'')) {
>>        bIncludesSingle = true;
>>        if (bIncludesDouble) {
>>          break;
>>        }
>>      } else if (*iCurr == char16_t('"')) {
>>        bIncludesDouble = true;
>>        if (bIncludesSingle) {
>>          break;
>>        }
>>      }
Comment on attachment 8799349 [details]
Bug 1308871 - removed dead code from nsXMLContentSerializer::SerializeAttr.

https://reviewboard.mozilla.org/r/84548/#review83112
Attachment #8799349 - Flags: review?(amarchesini) → review+
Pushed by bpostelnicu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8c310f3a5f9c
removed dead code from nsXMLContentSerializer::SerializeAttr. r=baku
https://hg.mozilla.org/mozilla-central/rev/8c310f3a5f9c
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.