Closed Bug 793308 Opened 13 years ago Closed 12 years ago

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

Categories

(Core :: SVG, defect)

All
Linux
defect
Not set
trivial

Tracking

()

RESOLVED FIXED
mozilla20

People

(Reporter: dholbert, Assigned: dholbert)

Details

Attachments

(1 file, 1 obsolete file)

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.)
Attached patch fix (obsolete) — Splinter Review
Attachment #686024 - Flags: review?(longsonr)
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.
Attached 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)
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+
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: