"arm.cpp:165: warning: 'bool<unnamed>::check_edsp()' defined but not used" -- same for "check_armv6()" & "check_neon()"

RESOLVED FIXED in mozilla6

Status

()

Core
XPCOM
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: dholbert, Assigned: derf)

Tracking

Trunk
mozilla6
x86_64
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [build_warning], URL)

Attachments

(1 attachment)

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1302796344.1302799845.1886.gz
xpcom/glue/arm.cpp:165: warning: 'bool<unnamed>::check_edsp()' defined but not used
xpcom/glue/arm.cpp:171: warning: 'bool<unnamed>::check_armv6()' defined but not used
xpcom/glue/arm.cpp:177: warning: 'bool<unnamed>::check_neon()' defined but not used

Looks like these functions are defined always (or at least "on linux x86_64 debug builds"), but their callers are #ifdef'd like e.g.

> 192 #if !defined(MOZILLA_PRESUME_ARMV6)
> 193     bool armv6_enabled = check_armv6();
> 194 #endif

Could we add the same #if conditions around these function definitions, to avoid building them when we don't need them, and to avoid spamming compile warnings?
actually, the more important ifdef around these functions' usages is probably:
> #if defined(MOZILLA_ARM_HAVE_CPUID_DETECTION)
(Assignee)

Comment 2

6 years ago
Created attachment 526173 [details] [diff] [review]
#ifdef out unused functions

I refactored the #ifdef's to be consistent about when things are defined vs. called, and also updated the indentation (which was inconsistent) and added comments for the closing #endifs which were far from their corresponding #ifs.
Assignee: nobody → tterribe
Status: NEW → ASSIGNED
Attachment #526173 - Flags: review?(dholbert)
Attachment #526173 - Flags: review?(dholbert) → review+
Thanks!

http://hg.mozilla.org/mozilla-central/rev/5cc41f55de1f
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla6
Depends on: 767034
You need to log in before you can comment on or make changes to this bug.