Closed Bug 1687152 Opened 3 years ago Closed 3 years ago

Fix static-analysis warnings related to `aDpiRatio` params in non-native theming code

Categories

(Core :: Widget, defect)

defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: spohl, Assigned: spohl)

References

Details

Attachments

(1 obsolete file)

static-analysis shows numerous "performance-unnecessary-value-param" warnings in non-native theming code:

"the parameter 'aDpiRatio' is copied for each invocation but only used as a const reference; consider making it a const reference"

Assignee: nobody → spohl.mozilla.bugs
Status: NEW → ASSIGNED
Attachment #9197606 - Attachment is obsolete: true

Per Phabricator review:

Yeah, I'm pretty sure we should just ignore that lint warning. https://godbolt.org/z/z3baf1 shows that on x64_64 we'll pass the DPIRatio value using a register, and when we have too many preceding arguments, we'll store the 32 bit float on the stack. With const DPIRatio& we're passing pointers around.

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: