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

ContactRequestChannel.cpp:93:5: warning: potential null pointer dereference #181

Open
milahu opened this issue Jan 28, 2024 · 0 comments
Open

Comments

@milahu
Copy link

milahu commented Jan 28, 2024

QVector<uint> chars = input.toUcs4();
foreach (uint value, chars) {

[ 26%] Building CXX object libtego/CMakeFiles/tego.dir/source/protocol/ContactRequestChannel.cpp.o
In file included from /nix/store/n8pq15i0xd81g2i551ri15q441j19mz3-qtbase-5.15.12-dev/include/QtCore/qlist.h:48,
                 from /nix/store/n8pq15i0xd81g2i551ri15q441j19mz3-qtbase-5.15.12-dev/include/QtCore/qvariant.h:45,
                 from /nix/store/n8pq15i0xd81g2i551ri15q441j19mz3-qtbase-5.15.12-dev/include/QtCore/qabstractitemmodel.h:43,
                 from /nix/store/n8pq15i0xd81g2i551ri15q441j19mz3-qtbase-5.15.12-dev/include/QtCore/QAbstractListModel:1,
                 from /build/source/src/libtego/source/precomp.h:75,
                 from /build/source/src/build/libtego/CMakeFiles/tego.dir/cmake_pch.hxx:5,
                 from <command-line>:
In copy constructor 'QVector<T>::QVector(const QVector<T>&) [with T = unsigned int]',
    inlined from 'QVector<T>::QVector(const QVector<T>&) [with T = unsigned int]' at /nix/store/n8pq15i0xd81g2i551ri15q441j19mz3-qtbase-5.15.12-dev/include/QtCore/qvector.h:372:8,
    inlined from 'QtPrivate::QForeachContainer<T>::QForeachContainer(const T&) [with T = QVector<unsigned int>]' at /nix/store/n8pq15i0xd81g2i551ri15q441j19mz3-qtbase-5.15.12-dev/include/QtCore/qglobal.h:1074:37,
    inlined from 'QtPrivate::QForeachContainer<typename std::decay<_Tp>::type> QtPrivate::qMakeForeachContainer(T&&) [with T = QVector<unsigned int>&]' at /nix/store/n8pq15i0xd81g2i551ri15q441j19mz3-qtbase-5.15.12-dev/include/QtCore/qglobal.h:1102:78,
    inlined from 'bool isAcceptableNickname(const QString&)' at /build/source/src/libtego/source/protocol/ContactRequestChannel.cpp:93:5:
/nix/store/n8pq15i0xd81g2i551ri15q441j19mz3-qtbase-5.15.12-dev/include/QtCore/qvector.h:385:16: warning: potential null pointer dereference [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wnull-dereference-Wnull-dereference8;;]
  385 |         if (d->alloc) {
      |             ~~~^~~~~

see also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant