Closed Bug 1841917 Opened 1 year ago Closed 1 year ago

error: variable does not need to be mutable

Categories

(Core :: Security: PSM, defect)

defect

Tracking

()

RESOLVED FIXED
117 Branch
Tracking Status
firefox117 --- fixed

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(1 file)

Building with upcoming rustc 1.71 fails with (with warnings as errors):

[task 2023-07-05T23:13:32.470Z] 23:13:32     INFO -  error: variable does not need to be mutable
[task 2023-07-05T23:13:32.470Z] 23:13:32     INFO -     --> security/manager/ssl/ipcclientcerts/src/lib.rs:458:13
[task 2023-07-05T23:13:32.470Z] 23:13:32     INFO -      |
[task 2023-07-05T23:13:32.470Z] 23:13:32     INFO -  458 |         let mut attr = unsafe { &mut *pTemplate.offset(i as isize) };
[task 2023-07-05T23:13:32.470Z] 23:13:32     INFO -      |             ----^^^^
[task 2023-07-05T23:13:32.470Z] 23:13:32     INFO -      |             |
[task 2023-07-05T23:13:32.471Z] 23:13:32     INFO -      |             help: remove this `mut`
[task 2023-07-05T23:13:32.471Z] 23:13:32     INFO -      |
[task 2023-07-05T23:13:32.471Z] 23:13:32     INFO -      = note: `-D unused-mut` implied by `-D warnings`
[task 2023-07-05T23:13:32.471Z] 23:13:32     INFO -  error: could not compile `ipcclientcerts-static` (lib) due to previous error

Also:

[task 2023-07-06T00:53:59.851Z] 00:53:59     INFO -  error: variable does not need to be mutable
[task 2023-07-06T00:53:59.851Z] 00:53:59     INFO -     --> security/manager/ssl/osclientcerts/src/lib.rs:537:13
[task 2023-07-06T00:53:59.851Z] 00:53:59     INFO -      |
[task 2023-07-06T00:53:59.851Z] 00:53:59     INFO -  537 |         let mut attr = unsafe { &mut *pTemplate.add(i) };
[task 2023-07-06T00:53:59.851Z] 00:53:59     INFO -      |             ----^^^^
[task 2023-07-06T00:53:59.851Z] 00:53:59     INFO -      |             |
[task 2023-07-06T00:53:59.851Z] 00:53:59     INFO -      |             help: remove this `mut`
[task 2023-07-06T00:53:59.851Z] 00:53:59     INFO -      |
[task 2023-07-06T00:53:59.851Z] 00:53:59     INFO -      = note: `-D unused-mut` implied by `-D warnings`
[task 2023-07-06T00:53:59.851Z] 00:53:59     INFO -  error: could not compile `osclientcerts-static` (lib) due to previous error
Attachment #9342488 - Attachment description: Bug 1841917 - Fix "variable does not need to be mutable" warning. → Bug 1841917 - Fix "variable does not need to be mutable" warnings.
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/179b2cb91ba7 Fix "variable does not need to be mutable" warnings. r=keeler
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: