Public bug reported:

I noticed (and I think this is the case with many, many more versions of
Qt) that when compiling with -Wconversion, the headers give lots and
lots of warnings. For example, when compiling a program containing only
"#include <QChar>" using <g++ -I/usr/include/qt4/QtCore
-I/usr/include/qt4 -c test.cpp> no warnings appear, but when adding
-Wconversion, this is the output:

In file included from /usr/include/qt4/QtCore/qchar.h:45,                       
             
                 from /usr/include/qt4/QtCore/QChar:1,                          
             
                 from test.cpp:1:                                               
             
/usr/include/qt4/QtCore/qglobal.h: In function ‘qint64 qRound64(qreal)’:
/usr/include/qt4/QtCore/qglobal.h:1027: warning: conversion to ‘qreal’ from 
‘qint64’ may alter its value
In file included from /usr/include/qt4/QtCore/QChar:1,
                 from test.cpp:1:
/usr/include/qt4/QtCore/qchar.h: In static member function ‘static ushort 
QChar::highSurrogate(uint)’:
/usr/include/qt4/QtCore/qchar.h:295: warning: conversion to ‘ushort’ from 
‘unsigned int’ mayalter its value
/usr/include/qt4/QtCore/qchar.h: In static member function ‘static ushort 
QChar::lowSurrogate(uint)’:
/usr/include/qt4/QtCore/qchar.h:298: warning: conversion to ‘ushort’ from 
‘unsigned int’ mayalter its value
/usr/include/qt4/QtCore/qchar.h: In constructor ‘QChar::QChar(uchar, uchar)’:
/usr/include/qt4/QtCore/qchar.h:369: warning: conversion to ‘ushort’ from ‘int’ 
may alter its value
/usr/include/qt4/QtCore/qchar.h: In member function ‘void 
QChar::setCell(uchar)’:
/usr/include/qt4/QtCore/qchar.h:377: warning: conversion to ‘ushort’ from ‘int’ 
may alter its value
/usr/include/qt4/QtCore/qchar.h: In member function ‘void QChar::setRow(uchar)’:
/usr/include/qt4/QtCore/qchar.h:379: warning: conversion to ‘ushort’ from ‘int’ 
may alter its value

These are unmodified headers. Should I just not compile with
-Wconversion, i.e. is this a wontfix bug? I understand that *really*
fixing it makes the headers a lot more ugly and complicated, yet it's an
ugly bug.

** Affects: qt4-x11 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
Compiling with -Wconversion gives lots and lots of warning messages in the Qt 
headers
https://bugs.launchpad.net/bugs/341411
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to