Closed Bug 577471 Opened 9 years ago Closed 4 years ago
warning: unused variable ‘t1’ in SHA256
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...
Assignee: nobody → timeless
Status: NEW → ASSIGNED
Attachment #456433 - Flags: review?(nelson)
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).
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...
All -Wunused-variable warnings in mozilla-central have been fixed.
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.