Closed
Bug 577471
Opened 16 years ago
Closed 10 years ago
warning: unused variable ‘t1’ in SHA256_End
Categories
(NSS :: Libraries, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: timeless, Assigned: timeless)
References
(Blocks 1 open bug)
Details
(Whiteboard: [build_warning])
Attachments
(1 file)
|
725 bytes,
patch
|
Details | Diff | Splinter Review |
ipc/chromium/src/base/third_party/nss/sha512.cc:
In function ‘void nss::SHA256_End(SHA256Context*, unsigned char*, unsigned int*, unsigned int)’:
442: warning: unused variable ‘t1’
I know I found it while building ipc, but the same code is in nss, so the fix should be applied there...
Comment 2•16 years ago
|
||
Timeless,
I'd prefer a patch that brackets lines 100-142 with
#if defined(IS_LITTLE_ENDIAN)
if that works (compiles correctly on all platforms).
Comment 3•16 years ago
|
||
Here's another possibility:
-#else /* neither windows nor Linux PC */
+#elif defined(IS_LITTLE_ENDIAN)
#define SWAP4MASK 0x00FF00FF
#define SHA_HTONL(x) (t1 = (x), t1 = (t1 << 16) | (t1 >> 16), \
((t1 & SWAP4MASK) << 8) | ((t1 >> 8) & SWAP4MASK))
Timeless,
on what platform did you see this?
You filed this against MacOS x86, but that's a little endian platform.
You must have seen this on some big-endian platform. What was it?
Can you test either of the above suggestions on that platform?
hrm, dunno. i use solaris-x86 and osx-ppc. the latter seems more likely, i probably built from my g5 via ssh from my mbp...
Updated•15 years ago
|
Whiteboard: [build_warning]
Updated•15 years ago
|
Blocks: buildwarning
Comment 5•10 years ago
|
||
All -Wunused-variable warnings in mozilla-central have been fixed.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•