Closed Bug 1245341 Opened 8 years ago Closed 8 years ago

TLS 1.3 broke the non-debug build with GCC 4.8.4

Categories

(NSS :: Libraries, defect)

defect
Not set
normal

Tracking

(firefox47 affected)

RESOLVED FIXED
Tracking Status
firefox47 --- affected

People

(Reporter: jld, Unassigned)

References

Details

Attachments

(1 file)

The NSS build, with BUILD_OPT=1, now fails thusly:

tls13con.c: In function ‘tls13_SetHsState’:
tls13con.c:153:17: error: unused variable ‘new_state_name’ [-Werror=unused-variable]
     const char *new_state_name = tls13_HandshakeState(ws);
                 ^
tls13con.c: In function ‘tls13_DeriveTrafficKeys’:
tls13con.c:1015:24: error: unused variable ‘n’ [-Werror=unused-variable]
     EXPAND_TRAFFIC_KEY(kHkdfPurposeClientWriteKey, client.write_key);
                        ^
tls13con.c:1016:24: error: unused variable ‘n’ [-Werror=unused-variable]
     EXPAND_TRAFFIC_KEY(kHkdfPurposeServerWriteKey, server.write_key);
                        ^
tls13con.c:1017:24: error: unused variable ‘n’ [-Werror=unused-variable]
     EXPAND_TRAFFIC_IV(kHkdfPurposeClientWriteIv, client.write_iv);
                        ^
tls13con.c:1018:24: error: unused variable ‘n’ [-Werror=unused-variable]
     EXPAND_TRAFFIC_IV(kHkdfPurposeServerWriteIv, server.write_iv);

From a quick look at the code, these all seem to be variables used only for assertions or debug logging.  The compiler in question:

$ gcc --version
gcc-4.8.real (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4
Comment on attachment 8715122 [details] [diff] [review]
0001-Fix-opt-build-unused-variables.patch

Review of attachment 8715122 [details] [diff] [review]:
-----------------------------------------------------------------

This should fix it.
Attachment #8715122 - Flags: review?(martin.thomson)
Jed, can you see if this fixes the problem
Flags: needinfo?(jld)
Attachment #8715122 - Flags: review?(martin.thomson) → review+
Comment on attachment 8715122 [details] [diff] [review]
0001-Fix-opt-build-unused-variables.patch

Works for me.  Thanks!
Flags: needinfo?(jld)
Attachment #8715122 - Flags: feedback+
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: