RESOLVED FIXED 25769
Fix accessibility warnings on GTK
https://bugs.webkit.org/show_bug.cgi?id=25769
Summary Fix accessibility warnings on GTK
chris fleizach
Reported 2009-05-13 17:04:44 PDT
here are the warnings this patch will try to fix ../../WebCore/page/AccessibilityTable.h:66: warning: type qualifiers ignored on function return type ../../WebCore/page/AccessibilityTable.h:67: warning: type qualifiers ignored on function return type ../../WebCore/page/AccessibilityRenderObject.cpp:2118: warning: ‘WebCore::createARIARoleMap()::RoleEntry’ declared with greater visibility than the type of its field ‘WebCore::createARIARoleMap()::RoleEntry::ariaRole’ ../../WebCore/page/AccessibilityTable.h:66: warning: type qualifiers ignored on function return type ../../WebCore/page/AccessibilityTable.h:67: warning: type qualifiers ignored on function return type ../../WebCore/page/AccessibilityTable.cpp:353: warning: type qualifiers ignored on function return type ../../WebCore/page/AccessibilityTable.cpp:361: warning: type qualifiers ignored on function return type ../../WebCore/page/AccessibilityTable.h:66: warning: type qualifiers ignored on function return type ../../WebCore/page/AccessibilityTable.h:67: warning: type qualifiers ignored on function return type ../../WebCore/page/AccessibilityTable.h:66: warning: type qualifiers ignored on function return type ../../WebCore/page/AccessibilityTable.h:67: warning: type qualifiers ignored on function return type
Attachments
patch (1.91 KB, patch)
2009-05-13 17:13 PDT, chris fleizach
mrowe: review-
patch (2.35 KB, patch)
2009-05-14 12:34 PDT, chris fleizach
darin: review+
chris fleizach
Comment 1 2009-05-13 17:13:36 PDT
Mark Rowe (bdash)
Comment 2 2009-05-13 19:47:31 PDT
Comment on attachment 30301 [details] patch This isn't correct. The warnings are saying that it doesn't make sense for the return type of a function to be "const unsigned", such as in "const unsigned columnCount();". Should that perhaps be "unsigned columnCount() const;"?
chris fleizach
Comment 3 2009-05-13 20:47:13 PDT
yes that sounds correct
chris fleizach
Comment 4 2009-05-14 12:34:29 PDT
Created attachment 30350 [details] patch updated patch based on review can't make columnCount into unsigned columnCount() const because it needs to call addChildren(), which is not const
Holger Freyther
Comment 5 2009-05-14 20:43:09 PDT
Comment on attachment 30350 [details] patch > Index: WebCore/page/AccessibilityRenderObject.cpp > =================================================================== > --- WebCore/page/AccessibilityRenderObject.cpp (revision 43716) > +++ WebCore/page/AccessibilityRenderObject.cpp (working copy) > @@ -2116,6 +2116,7 @@ typedef HashMap<String, AccessibilityRol > static const ARIARoleMap& createARIARoleMap() > { > struct RoleEntry { > + public: Isn't a struct public by default?
chris fleizach
Comment 6 2009-05-14 20:47:53 PDT
you'd think, but what does this warning mean then ‘WebCore::createARIARoleMap()::RoleEntry’ declared with greater visibility than the type of its field
Mark Rowe (bdash)
Comment 7 2009-05-16 20:17:15 PDT
*** Bug 25838 has been marked as a duplicate of this bug. ***
Darin Adler
Comment 8 2009-05-16 20:35:59 PDT
Comment on attachment 30350 [details] patch > { > struct RoleEntry { > + public: > String ariaRole; > AccessibilityRole webcoreRole; > }; This change does not make sense. In a struct, everything is public by default and this should have no effect. I have no idea why gcc is warning about this, but I do not think this is the fix. > Index: WebCore/page/AccessibilityTable.cpp > =================================================================== > --- WebCore/page/AccessibilityTable.cpp (revision 43716) > +++ WebCore/page/AccessibilityTable.cpp (working copy) > @@ -350,7 +350,7 @@ void AccessibilityTable::cells(Accessibi > } > } > > -const unsigned AccessibilityTable::columnCount() > +unsigned AccessibilityTable::columnCount() > { > if (!hasChildren()) > addChildren(); > @@ -358,7 +358,7 @@ const unsigned AccessibilityTable::colum > return m_columns.size(); > } > > -const unsigned AccessibilityTable::rowCount() > +unsigned AccessibilityTable::rowCount() > { > if (!hasChildren()) > addChildren(); > Index: WebCore/page/AccessibilityTable.h > =================================================================== > --- WebCore/page/AccessibilityTable.h (revision 43716) > +++ WebCore/page/AccessibilityTable.h (working copy) > @@ -63,8 +63,8 @@ public: > AccessibilityChildrenVector& columns(); > AccessibilityChildrenVector& rows(); > > - const unsigned columnCount(); > - const unsigned rowCount(); > + unsigned columnCount(); > + unsigned rowCount(); > > virtual String title() const; These changes are good. I'm saying r=me, but don't land that "public:" change -- it should have no effect.
chris fleizach
Comment 9 2009-05-16 23:17:24 PDT
alright, i won't make the struct change, which makes no sense (as does the warning). someone who compiles gtk can fix that
Darin Adler
Comment 10 2009-05-17 09:49:45 PDT
(In reply to comment #9) > alright, i won't make the struct change, which makes no sense (as does the > warning). I think that warning indicates a bug in the new gcc. Someone should investigate more and report the bug to the gcc maintainers.
Darin Adler
Comment 11 2009-05-17 09:50:35 PDT
Note You need to log in before you can comment on or make changes to this bug.