Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gcc 4.9.3 warnings. #18

Open
Techwolf opened this issue Oct 6, 2015 · 0 comments
Open

gcc 4.9.3 warnings. #18

Techwolf opened this issue Oct 6, 2015 · 0 comments
Labels

Comments

@Techwolf
Copy link

Techwolf commented Oct 6, 2015

When building the libqtelegram-ae, I got the following warnings:

x86_64-pc-linux-gnu-g++ -c -march=native -O2 -pipe -ggdb -Wall -W -D_REENTRANT -fPIC -DLIBQTELEGRAM_LIBRARY -DLQTG_DISABLE_LOG -DQT_NO_DEBUG -DQT_MULTIMEDIA_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -isystem /usr/include -I/usr/local/include/ -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtMultimedia -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtCore -I. -I/usr/lib64/qt5/mkspecs/linux-g++ -o session.o core/session.cpp
util/cryptoutils.cpp: In member function ‘qint32 CryptoUtils::computeKeyFingerprint(const QByteArray&, const QByteArray&)’:
util/cryptoutils.cpp:329:38: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     qint32 keyFingerprint = (*(int *)md5) ^ (*(int *)(md5 + 4));
                                      ^
x86_64-pc-linux-gnu-g++ -c -march=native -O2 -pipe -ggdb -Wall -W -D_REENTRANT -fPIC -DLIBQTELEGRAM_LIBRARY -DLQTG_DISABLE_LOG -DQT_NO_DEBUG -DQT_MULTIMEDIA_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -isystem /usr/include -I/usr/local/include/ -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtMultimedia -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtCore -I. -I/usr/lib64/qt5/mkspecs/linux-g++ -o session.o core/session.cpp
core/session.cpp: In member function ‘qint32 Session::aesEncryptMessage(Session::EncryptedMsg*)’:
core/session.cpp:419:91: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     qCDebug(TG_CORE_SESSION) << "sending message with sha1" << QString::number(*(qint32 *)sha1Buffer, 8);
                                                                                           ^
x86_64-pc-linux-gnu-g++ -c -march=native -O2 -pipe -ggdb -Wall -W -D_REENTRANT -fPIC -DLIBQTELEGRAM_LIBRARY -DLQTG_DISABLE_LOG -DQT_NO_DEBUG -DQT_MULTIMEDIA_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -isystem /usr/include -I/usr/local/include/ -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtMultimedia -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtCore -I. -I/usr/lib64/qt5/mkspecs/linux-g++ -o dcauth.o core/dcauth.cpp
core/dcauth.cpp: In member function ‘void DCAuth::processAuthComplete(InboundPkt&)’:
core/dcauth.cpp:309:36: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     m_dc->setServerSalt(*(qint64 *)m_serverNonce ^ *(qint64 *)m_newNonce);
                                    ^
core/dcauth.cpp:309:63: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     m_dc->setServerSalt(*(qint64 *)m_serverNonce ^ *(qint64 *)m_newNonce);
                                                               ^

Experience has taught me that warnings later turn into errors when things get upgraded.

@realbardia realbardia added the bug label Oct 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants