[Freeciv-Dev] [bug #24005] Qt client debug builds failing with many -Wshadow warnings

2015-11-09 Thread Marko Lindqvist
Update of bug #24005 (project freeciv):

  Status:  Ready For Test => Fixed  
 Assigned to:None => cazfi  
 Open/Closed:Open => Closed 


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #24005] Qt client debug builds failing with many -Wshadow warnings

2015-11-07 Thread Marko Lindqvist
Update of bug #24005 (project freeciv):

  Status:None => In Progress

___

Follow-up Comment #3:

I've got this reproduced with MinGW compiler (it's an older gcc than I
otherwise have in my system). So far this shows that fixing just those errors
seen in the log would not suffice. Though it had tried to compile all the
files despite one failing (because of '-k') there's cases where it has aborted
within a file without finding all the errors.

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #24005] Qt client debug builds failing with many -Wshadow warnings

2015-11-07 Thread Marko Lindqvist
Follow-up Comment #4, bug #24005 (project freeciv):

At this time this seems unfixable (or: the bug is not in freeciv) Some of the
warnings come from the interaction of the Qt headers (failing out the
compilation when processing includes in the very beginning of the source file,
before any freeciv code has been processed)
This is most likely g++ bug/misfeature (the fact that newer g++ versions do
not emit these warnings supports this assumption)

Seems like we have to leave -Whadow out of CXXFLAGS. As we currently have no
other C++ code than the components using Qt, simply dropping -Wshadow
completely from the CXXFLAGS is the best solution. Otherwise we could
experiment with more targeted adjustments.

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #24005] Qt client debug builds failing with many -Wshadow warnings

2015-11-07 Thread Marko Lindqvist
Update of bug #24005 (project freeciv):

  Status: In Progress => Ready For Test 

___

Follow-up Comment #5:

> simply dropping -Wshadow completely from the CXXFLAGS is the best solution

Patch


(file #25645)
___

Additional Item Attachment:

File name: C++ShadowNoWarn.patch  Size:0 KB


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #24005] Qt client debug builds failing with many -Wshadow warnings

2015-11-04 Thread Marko Lindqvist
Follow-up Comment #2, bug #24005 (project freeciv):

Ruledit part of the log -> patch #6542

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #24005] Qt client debug builds failing with many -Wshadow warnings

2015-10-30 Thread Jacob Nevins
URL:
  

 Summary: Qt client debug builds failing with many -Wshadow
warnings
 Project: Freeciv
Submitted by: jtn
Submitted on: Sat 31 Oct 2015 00:13:23 UTC
Category: client-qt
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 
 Discussion Lock: Any
Operating System: None
 Planned Release: 2.6.0, 3.0.0

___

Details:

My S2_6/trunk Qt client builds are failing with -Wshadow warnings (and
-Werror).

Ubuntu 14.04: Qt 5.2.1+dfsg-1ubuntu14.3, gcc 4.8.2-1ubuntu6

e.g. trunk r30327:


  CXX  chatline.lo
chatline.cpp: In constructor 'chatwdg::chatwdg(QWidget*)':
chatline.cpp:40:33: error: declaration of 'parent' shadows a member of 'this'
[-Werror=shadow]
 chatwdg::chatwdg(QWidget *parent)
 ^
chatline.cpp: In member function 'void chatwdg::append(QString)':
chatline.cpp:171:15: error: declaration of 'cursor' shadows a member of 'this'
[-Werror=shadow]
   QTextCursor cursor;
   ^
chatline.cpp: In member function 'void chatwdg::paint(QPainter*,
QPaintEvent*)':
chatline.cpp:206:58: error: declaration of 'event' shadows a member of 'this'
[-Werror=shadow]
 void chatwdg::paint(QPainter *painter, QPaintEvent *event)
  ^
chatline.cpp: In member function 'virtual void
chatwdg::paintEvent(QPaintEvent*)':
chatline.cpp:215:44: error: declaration of 'event' shadows a member of 'this'
[-Werror=shadow]
 void chatwdg::paintEvent(QPaintEvent *event)
^
chatline.cpp: In member function 'virtual bool chatwdg::eventFilter(QObject*,
QEvent*)':
chatline.cpp:227:54: error: declaration of 'event' shadows a member of 'this'
[-Werror=shadow]
 bool chatwdg::eventFilter(QObject *obj, QEvent *event)
  ^
In file included from /usr/include/qt5/QtCore/QMap:1:0,
 from fc_client.h:28,
 from chatline.cpp:30:
/usr/include/qt5/QtCore/qmap.h: In instantiation of 'typename QMap::iterator QMultiMap::insert(const Key&, const T&) [with Key = int;
T = QString; typename QMap::iterator = QMap::iterator]':
chatline.cpp:311:29:   required from here
/usr/include/qt5/QtCore/qmap.h:1153:44: error: declaration of 'value' shadows
a member of 'this' [-Werror=shadow]
 inline typename QMap::iterator insert(const Key , const T
)
^
/usr/include/qt5/QtCore/qmap.h:1153:44: error: declaration of 'key' shadows a
member of 'this' [-Werror=shadow]
At global scope:
cc1plus: error: unrecognized command line option "-Wno-tautological-compare"
[-Werror]
cc1plus: all warnings being treated as errors
make[2]: *** [chatline.lo] Error 1
make[2]: Leaving directory
`/home/jtn/src/freeciv/trunk-svn-inst/client/gui-qt'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/jtn/src/freeciv/trunk-svn-inst/client'
make: *** [install-recursive] Error 1





___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #24005] Qt client debug builds failing with many -Wshadow warnings

2015-10-30 Thread Jacob Nevins
Follow-up Comment #1, bug #24005 (project freeciv):

Workaround for now is


./configure --enable-debug=yes CXXFLAGS="-Wno-shadow"


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #24005] Qt client debug builds failing with many -Wshadow warnings

2015-10-30 Thread Jacob Nevins
Additional Item Attachment, bug #24005 (project freeciv):

File name: shadow.log Size:221 KB


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev