gcc warning: extensions/spellcheck/hunspell/src/affixmgr.cpp:3807: warning: unused variable ‘basefieldnum’

RESOLVED FIXED

Status

()

Core
Spelling checker
RESOLVED FIXED
10 years ago
7 years ago

People

(Reporter: georgi - hopefully not receiving bugspam, Unassigned)

Tracking

Trunk
x86
All
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(URL)

+++ This bug was initially created as a clone of Bug #458491 +++
I think this is bogus. It's inside an #ifdef DEBUG and is definitely used elsewhere in other DEBUG blocks.
Component: Rewriting and Analysis → Spelling checker
QA Contact: rewriting-and-analysis → spelling-checker
I'm pretty sure I know why this is coming up now. I'm assuming that bug 458491 uses debug builds for its analysis. Lines 3806-3808 of affixmgr.cpp define basefieldenum inside a DEBUG ifdef. However, the places that uses it (lines 4059-4070) are inside both a DEBUG and a HUNSPELL_EXPERIMENTAL ifdef, which the analysis tool isn't using. Therefore, it's seeing it defined in one spot and never used.

There's two ways out here. Either we can ignore it as a false positive or we can put an #ifdef HUNSPELL_EXPERIMENTAL around line 3807 as well to make the warning go away.

Nemeth, do you have a preference?
Nemeth, ping for a response.

Comment 4

8 years ago
I think this one is well old and gone now. Checking with any hunspell >= 1.2.1 and basefieldnum is declared and used inside bare #ifdef DEBUG blocks. Its all the way back to 1.1.2 before I see the extra #ifdef EXPERIMENTAL around the second DEBUG block. Definitely a -Wall -DDEBUG build shows no warning for this anymore. I think this is fixed in current release e.g. mozilla-1.9.2
Depends on: 564608
Fixed by bug 564608
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED

Updated

7 years ago
Blocks: 458491
No longer depends on: 458491
You need to log in before you can comment on or make changes to this bug.