Remove "string.h" includes from /content/svg

RESOLVED FIXED in mozilla20

Status

()

defect
--
trivial
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: dholbert, Assigned: dholbert)

Tracking

Trunk
mozilla20
All
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Assignee

Description

7 years ago
In reviewing bug 567848, I noticed some [#include "string.h" / #include <string.h>] statements that are unused/unnecessary.  (I can still build just fine if I remove them.)

In particular, these files have string.h includes that can be removed:
content/svg/content/src/SVGLengthList.cpp
content/svg/content/src/SVGNumberList.cpp
content/svg/content/src/SVGPathData.cpp
content/svg/content/src/SVGPathData.h
content/svg/content/src/SVGPointList.cpp
content/svg/content/src/SVGPointList.h

(This touches the same code as bug 567848, so I'm not posting a patch yet since it'd either bitrot bug 567848 or be bitrotted by bug 567848.  Trivial fix once bug 567848 lands, though.)
Assignee

Comment 1

7 years ago
Posted patch fix (obsolete) — Splinter Review
Attachment #686024 - Flags: review?(longsonr)
Assignee

Comment 2

7 years ago
Actually, SVGPathData.h and SVGPointList.h presumably have the #include because they use memcmp() in some inline code.  We still build with the attached patch, presumably because we're getting <string.h> from elsewhere, but we shouldn't rely on that.

The rest of the files from comment 0 don't use memcmp() or memset(), though, and I don't think they use any other string.h functions, so I think they still want to drop string.h.
Assignee

Comment 3

7 years ago
Posted patch fix v2Splinter Review
(reverted changes to two files, per prev comment)
Attachment #686024 - Attachment is obsolete: true
Attachment #686024 - Flags: review?(longsonr)
Attachment #686025 - Flags: review?(longsonr)
Assignee

Comment 4

7 years ago
FWIW, I verified (w/ grep) that the touched files don't make any calls to mem*() or str*() (I believe all string.h-exported methods fall into one of those naming schemes)
Attachment #686025 - Flags: review?(longsonr) → review+
https://hg.mozilla.org/mozilla-central/rev/280c4fb7794d
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
You need to log in before you can comment on or make changes to this bug.