GCC 4.6 build warning: nsSVGFilters.cpp:3794:21: warning: variable 'yExt' set but not used [-Wunused-but-set-variable]

RESOLVED FIXED

Status

()

defect
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: dholbert, Assigned: froydnj)

Tracking

(Blocks 1 bug)

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Reporter

Description

7 years ago
nsSVGFilters.cpp: In member function 'virtual nsresult nsSVGFEMorphologyElement::Filter(nsSVGFilterInstance*, const nsTArray<const nsSVGFE::Image*>&, const nsSVGFE::Image*, const nsIntRect&)':
nsSVGFilters.cpp:3794:21: warning: variable 'yExt' set but not used [-Wunused-but-set-variable]

This variable is mentioned 3 times:
> 3794   PRUint32 xExt[4], yExt[4];  // X, Y indices of RGBA extrema
[...]
> 3833                 yExt[i] = y1;
[...]
> 3848                 yExt[i] = y1;

Each of those lines simply set the value -- as the warning says, we never actually use the values in yExt.  So (unless that's a problem) we can just drop it.
Assignee

Comment 1

7 years ago
Posted patch patchSplinter Review
If it's not used, let's just remove it.
Assignee: nobody → nfroyd
Status: NEW → ASSIGNED
Attachment #597096 - Flags: review?(jwatt)
the comment needs updating since you've only got the X extrema now
I'm going to get to this tomorrow - I just want to check through the spec on this filter and understand if we should be using these values somehow.

Alternatively, Robert, if you know this part of the spec and know that we don't need them, feel free to r+.
The values are used to optimise the calculations by storing values that we can use later. I haven't looked really closely at the code to see whether the yExt values that we're caching could be used to optimise the calculation further though.

There's nothing in the spec about this it's all our implementation.
Comment on attachment 597096 [details] [diff] [review]
patch

This bit was solved as part of 711043.
Attachment #597096 - Flags: review?(jwatt)

Updated

7 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Reporter

Updated

7 years ago
Depends on: CVE-2013-1693
You need to log in before you can comment on or make changes to this bug.