Hello there! This is my first post here on GNOME Discourse. I’m Amy, a recent contributor to GNOME Settings. A lot of my work so far has been cleanup and warning resolution; a lot of the projects I’ve worked with in the past compile with -Werror
, so I’ve gotten accustomed to trying to clean out errors whenever I see them. I generally think it’s a good practice, as it increases maintainability and provides a little more sense of security in terms of bug count.
GNOME Settings throws tons (recent pipeline yielded 63) of warnings during compile. While these have gone down with time, there’s a lot that are still present. As anyone still using a.out knows, continuing to use deprecated functions is not a good long-term strategy for maintainability. Deprecation is the main source of warnings currently in Settings, mostly from four culprits:
- NetworkManager. Hand-counting yielded 12 warnings, all of which were from deprecated functions. Most of these appear to be legacy connection (usually removal) functions, but NM provides no replacement indicators, so someone knowledgeable with the panels will have to help work with this.
- ModemManager. Of course NM’s cousin is going to be involved here as well! There’s this one (enum?),
MMMobileEquipmentErrorDeprecated
, which as the name indicates is deprecated. I don’t know what needs to be done to fix this - yet another case of leaving no deprecation messages - but it is something that needs to be fixed, as anywhere that enum is currently used a warning (22 by my count) is generated. - CUPS/PPD. I can work on this one, and will be shortly, since CUPS thankfully provides proper deprecation messages. However, it is something that does need to be updated. By my count (
count("and friends") / 2
) there are 21 of these. - libupower. This one only has two warnings, but we need a familiar developer to fix them.
There’s also strays like some dead code in color and a cast-to-const in printers, but those four make up almost all of the outstanding warnings. (Wanted to put links, but new-user-limits got in the way)
I think it would be a really great idea - and would set a really great example - to get warning-free soon, potentially as soon as GNOME 43. While it’s certainly not a major thing, it would be something fun to show off GNOME code cleanliness. Maybe we could even get an addition in someone’s minor release notes.
– amyipdev