Summary: | Don't use const with GList | ||
---|---|---|---|
Product: | Wocky | Reporter: | Olivier Crête <olivier.crete> |
Component: | General | Assignee: | Telepathy bugs list <telepathy-bugs> |
Status: | RESOLVED FIXED | QA Contact: | Telepathy bugs list <telepathy-bugs> |
Severity: | normal | ||
Priority: | medium | CC: | will |
Version: | git master | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Don't put const before G*List, it does not make sense
Don't put const before GSList, the g_slist* functions aren't const-marked Don't put const before G*List, it does not make sense wocky_auth_registry_has_mechanism: fix coding style wocky_auth_registry_has_mechanism: simplify! |
Description
Olivier Crête
2011-03-01 11:33:54 UTC
Created attachment 43986 [details] [review] Don't put const before GSList, the g_slist* functions aren't const-marked Also for Gabble (I'm too lazy to open another bug for something so moronic) I think I basically agree—it's weird that you were seeing warnings on MeeGo though, I don't see them here. That said, if you're gonna go through and remove all the 'const's, at least remove the casts that are only necessary because of them. e.g.: static gboolean -wocky_auth_registry_has_mechanism (const GSList *list, const gchar *mech) { +wocky_auth_registry_has_mechanism (GSList *list, const gchar *mech) { GSList *t; t = g_slist_find_custom ((GSList *) list, mech, (GCompareFunc) g_strcmp0); ^^^^^^^^^^^^^^^ I just removed the ones that were blocking the build at that specific point in time... Created attachment 48778 [details] [review] Don't put const before G*List, it does not make sense Created attachment 48779 [details] [review] wocky_auth_registry_has_mechanism: fix coding style Created attachment 48780 [details] [review] wocky_auth_registry_has_mechanism: simplify! Comment on attachment 48778 [details] [review] Don't put const before G*List, it does not make sense Review of attachment 48778 [details] [review]: ----------------------------------------------------------------- Looks good to me Comment on attachment 48779 [details] [review] wocky_auth_registry_has_mechanism: fix coding style Review of attachment 48779 [details] [review]: ----------------------------------------------------------------- OK Comment on attachment 48780 [details] [review] wocky_auth_registry_has_mechanism: simplify! Review of attachment 48780 [details] [review]: ----------------------------------------------------------------- Yes I assume the three patches attached by Will supersede the first of the two attached by Olivier? If so, r+. Merged for Gabble 0.17.2. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.