Closed Bug 1411034 Opened 2 years ago Closed 2 years ago

Fix the -Werror=ignored-qualifiers warnings

Categories

(Firefox Build System :: Source Code Analysis, defect, P3)

defect

Tracking

(firefox58 fixed)

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: Sylvestre, Assigned: Sylvestre)

References

Details

Attachments

(3 files)

Example /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/nsTHashtable.h:417:29: error: type qualifiers ignored on cast result type [-Werror=ignored-qualifiers]
    return EntryType::HashKey(static_cast<const KeyTypePointer>(aKey));


type qualifiers ignored on cast result type [-Werror=ignored-qualifiers]
Priority: -- → P3
Comment on attachment 8921239 [details]
Bug 1411034 - Remove the const to fix the -Wignored-qualifiers warning

https://reviewboard.mozilla.org/r/192248/#review197436

This seems fine, but I question the usefulness of this warning. It seems overly pedantic; the extra const isn't hurting anything and in a way improves readability.
Attachment #8921239 - Flags: review?(erahm) → review+
Comment on attachment 8921236 [details]
Bug 1411034 - Remove the const to fix the -Wignored-qualifiers warning

https://reviewboard.mozilla.org/r/192240/#review197476
Attachment #8921236 - Flags: review?(mcmanus) → review+
Comment on attachment 8921238 [details]
Bug 1411034 - Remove the const to fix the -Wignored-qualifiers warning

https://reviewboard.mozilla.org/r/192246/#review197628

Sure.  Thanks.
Attachment #8921238 - Flags: review?(nfroyd) → review+
> This seems fine, but I question the usefulness of this warning. It seems
> overly pedantic; the extra const isn't hurting anything and in a way
> improves readability.
I will forward this feedback. It should probably be enabled only in -Wextra
Pushed by sledru@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bf9838fd466c
Remove the const to fix the -Wignored-qualifiers warning r=froydnj
https://hg.mozilla.org/integration/autoland/rev/82528ab21c0f
Remove the const to fix the -Wignored-qualifiers warning r=erahm
https://hg.mozilla.org/integration/autoland/rev/abd469789934
Remove the const to fix the -Wignored-qualifiers warning r=mcmanus
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.