Last Comment Bug 650162 - "arm.cpp:165: warning: 'bool<unnamed>::check_edsp()' defined but not used" -- same for "check_armv6()" & "check_neon()"
: "arm.cpp:165: warning: 'bool<unnamed>::check_edsp()' defined but not used" --...
Status: RESOLVED FIXED
[build_warning]
:
Product: Core
Classification: Components
Component: XPCOM (show other bugs)
: Trunk
: x86_64 Linux
: -- normal (vote)
: mozilla6
Assigned To: Timothy B. Terriberry (:derf)
:
Mentors:
http://tinderbox.mozilla.org/showlog....
Depends on: 767034
Blocks: 583958
  Show dependency treegraph
 
Reported: 2011-04-14 16:57 PDT by Daniel Holbert [:dholbert]
Modified: 2012-06-21 10:17 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
#ifdef out unused functions (4.04 KB, patch)
2011-04-14 19:02 PDT, Timothy B. Terriberry (:derf)
dholbert: review+
Details | Diff | Splinter Review

Description Daniel Holbert [:dholbert] 2011-04-14 16:57:28 PDT
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?
Comment 1 Daniel Holbert [:dholbert] 2011-04-14 16:58:46 PDT
actually, the more important ifdef around these functions' usages is probably:
> #if defined(MOZILLA_ARM_HAVE_CPUID_DETECTION)
Comment 2 Timothy B. Terriberry (:derf) 2011-04-14 19:02:53 PDT
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.
Comment 3 :Ms2ger (⌚ UTC+1/+2) 2011-04-16 05:46:57 PDT
Thanks!

http://hg.mozilla.org/mozilla-central/rev/5cc41f55de1f

Note You need to log in before you can comment on or make changes to this bug.