Conversion warnings in qt headers 4.7.3 under x86_64 linux



  • Hi,

    Does anybody else get tons of 'conversion to 'long unsigned int' from 'long int'' warnings
    in qlist.h and qglobal.h and etc. when compiling against qt 4.7.3 with gcc 4.6.0 on 64bit
    machine?

    Is there any way to fix this.

    @
    In file included from /usr/include/QtCore/qnamespace.h:45:0,
    from /usr/include/QtCore/qobjectdefs.h:45,
    from /usr/include/QtCore/qobject.h:47,
    from /usr/include/QtCore/qabstractanimation.h:45,
    from /usr/include/QtCore/QtCore:3,
    from /usr/include/QtSql/QtSql:3,
    from ../../src/neuron/pch.h:34:
    /usr/include/QtCore/qglobal.h: In member function 'QFlags<Enum> QFlags<Enum>::operator|(Enum) const [with Enum = Qt::KeyboardModifier, QFlags<Enum> = QFlagsQt::KeyboardModifier]':
    /usr/include/QtCore/qnamespace.h:1789:1: instantiated from here
    /usr/include/QtCore/qglobal.h:2204:55: warning: conversion to 'unsigned int' from 'int' may change the sign of the result [-Wsign-conversion]
    /usr/include/QtCore/qglobal.h:2204:55: warning: conversion to 'int' from 'unsigned int' may change the sign of the result [-Wsign-conversion]
    /usr/include/QtCore/qglobal.h: In member function 'QFlags<Enum> QFlags<Enum>::operator|(Enum) const [with Enum = Qt::WindowType, QFlags<Enum> = QFlagsQt::WindowType]':
    /usr/include/QtCore/qnamespace.h:1790:1: instantiated from here
    /usr/include/QtCore/qglobal.h:2204:55: warning: conversion to 'unsigned int' from 'int' may change the sign of the result [-Wsign-conversion]
    /usr/include/QtCore/qglobal.h:2204:55: warning: conversion to 'int' from 'unsigned int' may change the sign of the result [-Wsign-conversion]
    /usr/include/QtCore/qglobal.h: In member function 'QFlags<Enum> QFlags<Enum>::operator|(Enum) const [with Enum = Qt::InputMethodHint, QFlags<Enum> = QFlagsQt::InputMethodHint]':
    /usr/include/QtCore/qnamespace.h:1800:1: instantiated from here
    /usr/include/QtCore/qglobal.h:2204:55: warning: conversion to 'unsigned int' from 'int' may change the sign of the result [-Wsign-conversion]
    /usr/include/QtCore/qglobal.h:2204:55: warning: conversion to 'int' from 'unsigned int' may change the sign of the result [-Wsign-conversion]

    In file included from /usr/include/QtCore/qobject.h:50:0,
    from /usr/include/QtCore/qabstractanimation.h:45,
    from /usr/include/QtCore/QtCore:3,
    from /usr/include/QtSql/QtSql:3,
    from ../../src/neuron/pch.h:34:
    /usr/include/QtCore/qlist.h: In member function 'void QList<T>::node_copy(QList<T>::Node*, QList<T>::Node*, QList<T>::Node*) [with T = QString]':
    /usr/include/QtCore/qlist.h:807:17: instantiated from 'QList<T>& QList<T>::operator+=(const QList<T>&) [with T = QString]'
    /usr/include/QtCore/qstringlist.h:85:35: instantiated from here
    /usr/include/QtCore/qlist.h:410:13: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
    /usr/include/QtCore/qlist.h: In member function 'void QList<T>::node_copy(QList<T>::Node*, QList<T>::Node*, QList<T>::Node*) [with T = QVariant]':
    /usr/include/QtCore/qlist.h:696:9: instantiated from 'void QList<T>::detach_helper(int) [with T = QVariant]'
    /usr/include/QtCore/qlist.h:710:5: instantiated from 'void QList<T>::detach_helper() [with T = QVariant]'
    /usr/include/QtCore/qlist.h:118:80: instantiated from 'QList<T>::QList(const QList<T>&) [with T = QVariant]'
    /usr/include/QtCore/qstatemachine.h:82:59: instantiated from here
    /usr/include/QtCore/qlist.h:410:13: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
    @

    My qt configure command looks like this:

    @./configure -opensource -release -static -nomake tools -nomake examples -nomake demos -nomake docs -nomake translations
    -embedded -no-qt3support -no-multimedia -no-audio-backend -no-phonon -no-phonon-backend -no-svg -no-webkit -no-javascript-jit
    -no-script -no-scripttools -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx -no-neon -no-gif -no-libtiff -no-libpng -no-libjpeg -no-libmng
    -no-gui -no-cups -no-gtkstyle -no-nas-sound -no-opengl -no-openvg -no-sm -no-xshape -no-xvideo -no-xsync -no-xinerama
    -no-xcursor -no-xfixes -no-xrandr -no-xrender -no-mitshm -no-fontconfig -no-xinput -no-xkb -no-glib -plugin-sql-mysql
    -I/usr/include -L/usr/lib -prefix /usr
    @

    Regards


  • Moderators

    My experience is yes. Typically you should worry about errors, because then you do not get the libs. It is similar under linux(ubuntu) and windows.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.