Closed
Bug 265786
Opened 21 years ago
Closed 20 years ago
unused variable warnings in QuickDER
Categories
(NSS :: Libraries, defect, P4)
Tracking
(Not tracked)
RESOLVED
FIXED
3.10
People
(Reporter: julien.pierre, Assigned: julien.pierre)
Details
The gcc compiler generates warnings in the following :
quickder.c: In function `MatchComponentType':
quickder.c:252: warning: unused variable `tagclass'
quickder.c:253: warning: unused variable `expectedclass
The code is #ifdef DEBUG and the variables are never used indeed. For
cleanliness, I would like to eliminate the warning anyway. What's the best way
to do this ? I was thinking of assigning tagclass = tagclass and expectedclass =
expectedclass right after. Are there any compilers that will still warn on those ?
| Assignee | ||
Updated•21 years ago
|
Priority: -- → P4
Comment 1•21 years ago
|
||
A trick John Myers told me is to use the
unused variables like this:
(void)tagclass;
(void)expectedclass;
Perhaps you can find a more meaningful way
to use them. I know you want to have access
to the these values in the debugger.
Comment 2•21 years ago
|
||
Julien, after looking at the relevant code, I
suggest the following fix:
unsigned char tagclass;
unsigned char expectedclass;
...
/* first, do a class check */
tagclass = tag & SEC_ASN1_CLASS_MASK;
expectedclass = (unsigned char)kind & SEC_ASN1_CLASS_MASK;
if (tagclass != expectedclass)
{
*match = PR_FALSE;
return SECSuccess;
}
Updated•20 years ago
|
QA Contact: bishakhabanerjee → jason.m.reid
| Assignee | ||
Updated•20 years ago
|
Assignee: wtchang → julien.pierre.bugs
Target Milestone: --- → 3.10
| Assignee | ||
Comment 3•20 years ago
|
||
This bug was fixed in 3.10 .
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•