Closed Bug 1410765 Opened 7 years ago Closed 7 years ago

Three tiny libpref tweaks

Categories

(Core :: Preferences: Backend, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: n.nethercote, Assigned: n.nethercote)

References

Details

Attachments

(3 files, 1 obsolete file)

A tiny clean-up.
Attachment #8920923 - Flags: review?(mh+mozilla)
Attachment #8920923 - Attachment is obsolete: true
Attachment #8920923 - Flags: review?(mh+mozilla)
Summary: Remove unused PrefTypeFlags values → Three tiny libpref tweaks
Comment on attachment 8920924 [details] [diff] [review] (part 1) - Remove unused PrefTypeFlags values Review of attachment 8920924 [details] [diff] [review]: ----------------------------------------------------------------- ::: modules/libpref/Preferences.cpp @@ -244,5 @@ > PREF_FLAG_LOCKED = 4, > PREF_FLAG_USERSET = 8, > - PREF_FLAG_CONFIG = 16, > - PREF_FLAG_REMOTE = 32, > - PREF_FLAG_LILOCAL = 64, FWIW, they were effectively removed in bug 99611.
Attachment #8920924 - Flags: review?(mh+mozilla) → review+
Attachment #8920926 - Flags: review?(mh+mozilla) → review+
Comment on attachment 8920933 [details] [diff] [review] (part 3) - Remove nsPrefBranch::RemoveObserverFromMap declaration Review of attachment 8920933 [details] [diff] [review]: ----------------------------------------------------------------- Static analysis for this kind of stuff could be interesting (declared methods that we never define).
Attachment #8920933 - Flags: review?(mh+mozilla) → review+
> Static analysis for this kind of stuff could be interesting (declared > methods that we never define). Sylvestre, do you know if a clang static analysis could be written to detect methods that are declared but never defined? (Like the one removed by part 3 above.)
(See comment 8)
Flags: needinfo?(sledru)
(In reply to Nicholas Nethercote [:njn] from comment #8) > > Static analysis for this kind of stuff could be interesting (declared > > methods that we never define). > > Sylvestre, do you know if a clang static analysis could be written to detect > methods that are declared but never defined? (Like the one removed by part 3 > above.) This would have several issues: 1. Possibility of external addressing of functions, that is resolved only during linkage. So in a compilation unit we would only define functions that would be externally called by other compilation units. 2. The impossibility of clang to match decl and call simultaneously, in an ast tree, this would have to be done only by transvering manually the tree by matching for each declaration all of the funcCalls and then triage them by signature. 3. There is the possibility to also call functions by pointer to functions or pointers to member function that again will complicate the resolution and would generate a lot of false positives. Having all of this issues I don't see the real gaining of having this kind of checker, only the fact that we might reduce TXT size.
Fair enough!
I asked Andi to answered about that :) Merci Andi!
Flags: needinfo?(sledru)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: