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
Created attachment 30301 [details] patch
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;"?
yes that sounds correct
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
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?
you'd think, but what does this warning mean then ‘WebCore::createARIARoleMap()::RoleEntry’ declared with greater visibility than the type of its field
*** Bug 25838 has been marked as a duplicate of this bug. ***
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.
alright, i won't make the struct change, which makes no sense (as does the warning). someone who compiles gtk can fix that
(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.
http://trac.webkit.org/changeset/43810