compiler warnings in pinentry-qt4
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Wed May 13 22:35:02 CEST 2015
Hi gnupg pinentry folks--
I'm seeing the compiler warnings below when building pinentry-qt4 from
0.9.2.
It'd be nice to clean up the source, so that real warnings/errors stand
out a bit more.
Thanks for your work on pinentry!
--dkg
g++ -DHAVE_CONFIG_H -I. -I.. -pthread -I/usr/include/libsecret-1 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I.. -I../assuan -I../secmem -I/usr/include/ncursesw -I../pinentry -D_FORTIFY_SOURCE=2 -Wall -DQT_SHARED -I/usr/include/qt4 -I/usr/include/qt4/QtCore -DQT_SHARED -I/usr/include/qt4 -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I/usr/include/qt4/QtCore -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c -o secstring.o secstring.cpp
secstring.cpp: In function ‘secstring toUtf8(const secqstring&)’:
secstring.cpp:71:16: warning: unused variable ‘cursor’ [-Wunused-variable]
uchar *cursor = (uchar*)ba.data();
^
g++ -DHAVE_CONFIG_H -I. -I.. -pthread -I/usr/include/libsecret-1 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I.. -I../assuan -I../secmem -I/usr/include/ncursesw -I../pinentry -D_FORTIFY_SOURCE=2 -Wall -DQT_SHARED -I/usr/include/qt4 -I/usr/include/qt4/QtCore -DQT_SHARED -I/usr/include/qt4 -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I/usr/include/qt4/QtCore -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c -o qsecurelineedit.o qsecurelineedit.cpp
In file included from /usr/include/qt4/QtCore/qnamespace.h:45:0,
from /usr/include/qt4/QtCore/qobjectdefs.h:45,
from /usr/include/qt4/QtGui/qwindowdefs.h:45,
from /usr/include/qt4/QtGui/qwidget.h:46,
from /usr/include/qt4/QtGui/qframe.h:45,
from /usr/include/qt4/QtGui/qlineedit.h:45,
from qsecurelineedit.cpp:47:
qsecurelineedit.cpp: In member function ‘virtual QSize QSecureLineEdit::sizeHint() const’:
/usr/include/qt4/QtCore/qglobal.h:2599:43: warning: unused variable ‘d’ [-Wunused-variable]
#define Q_D(Class) Class##Private * const d = d_func()
^
qsecurelineedit.cpp:718:5: note: in expansion of macro ‘Q_D’
Q_D(const QSecureLineEdit);
^
qsecurelineedit.cpp: In member function ‘virtual QSize QSecureLineEdit::minimumSizeHint() const’:
/usr/include/qt4/QtCore/qglobal.h:2599:43: warning: unused variable ‘d’ [-Wunused-variable]
#define Q_D(Class) Class##Private * const d = d_func()
^
qsecurelineedit.cpp:742:5: note: in expansion of macro ‘Q_D’
Q_D(const QSecureLineEdit);
^
qsecurelineedit.cpp: In member function ‘void QSecureLineEdit::setCursorPosition(int)’:
qsecurelineedit.cpp:776:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (pos <= d->text.length())
^
In file included from /usr/include/qt4/QtCore/qnamespace.h:45:0,
from /usr/include/qt4/QtCore/qobjectdefs.h:45,
from /usr/include/qt4/QtGui/qwindowdefs.h:45,
from /usr/include/qt4/QtGui/qwidget.h:46,
from /usr/include/qt4/QtGui/qframe.h:45,
from /usr/include/qt4/QtGui/qlineedit.h:45,
from qsecurelineedit.cpp:47:
qsecurelineedit.cpp: In member function ‘void QSecureLineEdit::paste()’:
/usr/include/qt4/QtCore/qglobal.h:2599:43: warning: unused variable ‘d’ [-Wunused-variable]
#define Q_D(Class) Class##Private * const d = d_func()
^
qsecurelineedit.cpp:1484:5: note: in expansion of macro ‘Q_D’
Q_D(QSecureLineEdit);
^
qsecurelineedit.cpp: In member function ‘void QSecureLineEditPrivate::setText(const secqstring&, int, bool)’:
qsecurelineedit.cpp:2925:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
cursor = (pos < 0 || pos > text.size()) ? text.size() : pos;
^
qsecurelineedit.cpp: In member function ‘bool QSecureLineEditPrivate::hasAcceptableInput(const secqstring&) const’:
qsecurelineedit.cpp:3214:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (str.length() != maxLength)
^
qsecurelineedit.cpp: In member function ‘secqstring QSecureLineEditPrivate::maskString(uint, const secqstring&, bool) const’:
qsecurelineedit.cpp:3247:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (strIndex < str.length()) {
^
More information about the Gnupg-devel
mailing list