Page MenuHomePhabricator

Arc lint everything
ClosedPublic

Authored by Fabien on Jul 24 2020, 14:31.

Details

Reviewers
majcosta
Group Reviewers
Restricted Project
Commits
rABCe5c8de5ca23a: Arc lint everything
Summary

Fix a couple cppcheck issues (uninitialized variables from
key_io.cpp) and a missing newline for clang-format.

Test Plan
arc lint --everything

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien requested review of this revision.Jul 24 2020, 14:31

Snippet of first build failure:

--   thread
--   system
--   date_time
--   atomic
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29") 
-- Found Event component event: /usr/lib/x86_64-linux-gnu/libevent.so
-- Found Event: /usr/include (found suitable version "2.1.8-stable", minimum required is "2.0.22") found components:  event 
-- Found Event component pthreads: /usr/lib/x86_64-linux-gnu/libevent_pthreads.so
-- Found Event: /usr/include (found suitable version "2.1.8-stable", minimum required is "2.0.22") found components:  pthreads 
-- Boost version: 1.67.0
-- Found the following Boost libraries:
--   unit_test_framework
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK - Success
-- Boost version: 1.67.0
-- Found the following Boost libraries:
--   unit_test_framework
-- Boost version: 1.67.0
-- Found the following Boost libraries:
--   unit_test_framework
-- Boost version: 1.67.0
-- Found the following Boost libraries:
--   unit_test_framework
-- Configuring done
-- Generating done
-- Build files have been written to: /work/abc-ci-builds/build-without-wallet/native
[100/422] Generating bitcoin_hu.qm
Removed plural forms as the target language has less forms.
If this sounds wrong, possibly the target language is not set or recognized.
[119/422] Generating bitcoin_pl.qm
Removed plural forms as the target language has less forms.
If this sounds wrong, possibly the target language is not set or recognized.
[127/422] Generating bitcoin_ru.qm
Removed plural forms as the target language has less forms.
If this sounds wrong, possibly the target language is not set or recognized.
[140/422] Generating bitcoin_tr.qm
Removed plural forms as the target language has less forms.
If this sounds wrong, possibly the target language is not set or recognized.
[192/422] Building CXX object src/zmq/CMakeFiles/zmq.dir/zmqrpc.cpp.o
FAILED: src/zmq/CMakeFiles/zmq.dir/zmqrpc.cpp.o 
/usr/bin/ccache /usr/bin/c++  -DBOOST_AC_USE_STD_ATOMIC -DBOOST_SP_USE_STD_ATOMIC -DENABLE_AVX2 -DENABLE_SHANI -DENABLE_SSE41 -DHAVE_BUILD_INFO -DHAVE_CONFIG_H -I../../src/. -Isrc -I../../src/univalue/include -Isrc/crypto/.. -isystem /usr/include/jemalloc -Werror -g -O2 -fPIC -fvisibility=hidden   -fstack-reuse=none -fstack-protector-all -Wstack-protector -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wformat -Wvla -Wcast-align -Wunused-parameter -Wmissing-braces -Wshadow -Wredundant-decls -Wformat-security -Wno-unused-parameter -Wno-implicit-fallthrough -pthread -std=gnu++14 -MD -MT src/zmq/CMakeFiles/zmq.dir/zmqrpc.cpp.o -MF src/zmq/CMakeFiles/zmq.dir/zmqrpc.cpp.o.d -o src/zmq/CMakeFiles/zmq.dir/zmqrpc.cpp.o -c ../../src/zmq/zmqrpc.cpp
In file included from ../../src/./key.h:10,
                 from ../../src/./script/signingprovider.h:9,
                 from ../../src/./outputtype.h:10,
                 from ../../src/./rpc/util.h:9,
                 from ../../src/zmq/zmqrpc.cpp:8:
../../src/./pubkey.h:232:31: error: return type specification for constructor invalid
     CExtPubKey CExtPubKey() = default;
                               ^~~~~~~
In file included from ../../src/./script/signingprovider.h:9,
                 from ../../src/./outputtype.h:10,
                 from ../../src/./rpc/util.h:9,
                 from ../../src/zmq/zmqrpc.cpp:8:
../../src/./key.h:192:25: error: return type specification for constructor invalid
     CExtKey CExtKey() = default;
                         ^~~~~~~
[194/422] Building CXX object src/CMakeFiles/util.dir/util/time.cpp.o
[196/422] Building CXX object src/CMakeFiles/util.dir/util/system.cpp.o
ninja: build stopped: subcommand failed.
Build build-without-wallet failed with exit code 1

Snippet of first build failure:

--   thread
--   system
--   date_time
--   atomic
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29") 
-- Found Event component event: /usr/lib/x86_64-linux-gnu/libevent.so
-- Found Event: /usr/include (found suitable version "2.1.8-stable", minimum required is "2.0.22") found components:  event 
-- Found Event component pthreads: /usr/lib/x86_64-linux-gnu/libevent_pthreads.so
-- Found Event: /usr/include (found suitable version "2.1.8-stable", minimum required is "2.0.22") found components:  pthreads 
-- Boost version: 1.67.0
-- Found the following Boost libraries:
--   unit_test_framework
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK - Success
-- Boost version: 1.67.0
-- Found the following Boost libraries:
--   unit_test_framework
-- Boost version: 1.67.0
-- Found the following Boost libraries:
--   unit_test_framework
-- Boost version: 1.67.0
-- Found the following Boost libraries:
--   unit_test_framework
-- Configuring done
-- Generating done
-- Build files have been written to: /work/abc-ci-builds/build-diff/native
[95/470] Generating bitcoin_hu.qm
Removed plural forms as the target language has less forms.
If this sounds wrong, possibly the target language is not set or recognized.
[116/470] Generating bitcoin_pl.qm
Removed plural forms as the target language has less forms.
If this sounds wrong, possibly the target language is not set or recognized.
[122/470] Generating bitcoin_ru.qm
Removed plural forms as the target language has less forms.
If this sounds wrong, possibly the target language is not set or recognized.
[132/470] Generating bitcoin_tr.qm
Removed plural forms as the target language has less forms.
If this sounds wrong, possibly the target language is not set or recognized.
[191/470] Building CXX object src/zmq/CMakeFiles/zmq.dir/zmqrpc.cpp.o
FAILED: src/zmq/CMakeFiles/zmq.dir/zmqrpc.cpp.o 
/usr/bin/ccache /usr/bin/c++  -DBOOST_AC_USE_STD_ATOMIC -DBOOST_SP_USE_STD_ATOMIC -DENABLE_AVX2 -DENABLE_SHANI -DENABLE_SSE41 -DHAVE_BUILD_INFO -DHAVE_CONFIG_H -I../../src/. -Isrc -I../../src/univalue/include -Isrc/crypto/.. -isystem /usr/include/jemalloc -Werror -g -O2 -fPIC -fvisibility=hidden   -fstack-reuse=none -fstack-protector-all -Wstack-protector -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wformat -Wvla -Wcast-align -Wunused-parameter -Wmissing-braces -Wshadow -Wredundant-decls -Wformat-security -Wno-unused-parameter -Wno-implicit-fallthrough -pthread -std=gnu++14 -MD -MT src/zmq/CMakeFiles/zmq.dir/zmqrpc.cpp.o -MF src/zmq/CMakeFiles/zmq.dir/zmqrpc.cpp.o.d -o src/zmq/CMakeFiles/zmq.dir/zmqrpc.cpp.o -c ../../src/zmq/zmqrpc.cpp
In file included from ../../src/./key.h:10,
                 from ../../src/./script/signingprovider.h:9,
                 from ../../src/./outputtype.h:10,
                 from ../../src/./rpc/util.h:9,
                 from ../../src/zmq/zmqrpc.cpp:8:
../../src/./pubkey.h:232:31: error: return type specification for constructor invalid
     CExtPubKey CExtPubKey() = default;
                               ^~~~~~~
In file included from ../../src/./script/signingprovider.h:9,
                 from ../../src/./outputtype.h:10,
                 from ../../src/./rpc/util.h:9,
                 from ../../src/zmq/zmqrpc.cpp:8:
../../src/./key.h:192:25: error: return type specification for constructor invalid
     CExtKey CExtKey() = default;
                         ^~~~~~~
[194/470] Building CXX object src/CMakeFiles/util.dir/util/time.cpp.o
[196/470] Building CXX object src/CMakeFiles/util.dir/util/system.cpp.o
ninja: build stopped: subcommand failed.
Build build-diff failed with exit code 1

Snippet of first build failure:

--   filesystem
--   thread
--   system
--   date_time
--   atomic
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29") 
-- Found Event component event: /usr/lib/x86_64-linux-gnu/libevent.so
-- Found Event: /usr/include (found suitable version "2.1.8-stable", minimum required is "2.0.22") found components:  event 
-- Found Event component pthreads: /usr/lib/x86_64-linux-gnu/libevent_pthreads.so
-- Found Event: /usr/include (found suitable version "2.1.8-stable", minimum required is "2.0.22") found components:  pthreads 
-- Boost version: 1.67.0
-- Found the following Boost libraries:
--   unit_test_framework
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK - Success
-- Boost version: 1.67.0
-- Found the following Boost libraries:
--   unit_test_framework
-- Boost version: 1.67.0
-- Found the following Boost libraries:
--   unit_test_framework
-- Boost version: 1.67.0
-- Found the following Boost libraries:
--   unit_test_framework
-- Configuring done
-- Generating done
-- Build files have been written to: /work/abc-ci-builds/build-clang-10/native
[108/470] Generating bitcoin_hu.qm
Removed plural forms as the target language has less forms.
If this sounds wrong, possibly the target language is not set or recognized.
[131/470] Generating bitcoin_pl.qm
Removed plural forms as the target language has less forms.
If this sounds wrong, possibly the target language is not set or recognized.
[137/470] Generating bitcoin_ru.qm
Removed plural forms as the target language has less forms.
If this sounds wrong, possibly the target language is not set or recognized.
[150/470] Generating bitcoin_tr.qm
Removed plural forms as the target language has less forms.
If this sounds wrong, possibly the target language is not set or recognized.
[197/470] Building CXX object src/zmq/CMakeFiles/zmq.dir/zmqrpc.cpp.o
FAILED: src/zmq/CMakeFiles/zmq.dir/zmqrpc.cpp.o 
/usr/bin/ccache /usr/bin/clang++-10  -DBOOST_AC_USE_STD_ATOMIC -DBOOST_SP_USE_STD_ATOMIC -DENABLE_AVX2 -DENABLE_SHANI -DENABLE_SSE41 -DHAVE_BUILD_INFO -DHAVE_CONFIG_H -I../../src/. -Isrc -I../../src/univalue/include -Isrc/crypto/.. -isystem /usr/include/jemalloc -Werror -g -O2 -fPIC -fvisibility=hidden   -fstack-protector-all -Wstack-protector -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wformat -Wvla -Wcast-align -Wunused-parameter -Wmissing-braces -Wthread-safety-analysis -Wshadow -Wshadow-field -Wrange-loop-analysis -Wredundant-decls -Wformat-security -Wredundant-move -Wno-unused-parameter -Wno-implicit-fallthrough -pthread -std=gnu++14 -MD -MT src/zmq/CMakeFiles/zmq.dir/zmqrpc.cpp.o -MF src/zmq/CMakeFiles/zmq.dir/zmqrpc.cpp.o.d -o src/zmq/CMakeFiles/zmq.dir/zmqrpc.cpp.o -c ../../src/zmq/zmqrpc.cpp
In file included from ../../src/zmq/zmqrpc.cpp:8:
In file included from ../../src/./rpc/util.h:9:
In file included from ../../src/./outputtype.h:10:
In file included from ../../src/./script/signingprovider.h:9:
In file included from ../../src/./key.h:10:
../../src/./pubkey.h:232:16: error: constructor cannot have a return type
    CExtPubKey CExtPubKey() = default;
    ~~~~~~~~~~ ^~~~~~~~~~
In file included from ../../src/zmq/zmqrpc.cpp:8:
In file included from ../../src/./rpc/util.h:9:
In file included from ../../src/./outputtype.h:10:
In file included from ../../src/./script/signingprovider.h:9:
../../src/./key.h:192:13: error: constructor cannot have a return type
    CExtKey CExtKey() = default;
    ~~~~~~~ ^~~~~~~
2 errors generated.
ninja: build stopped: subcommand failed.
Build build-clang-10 failed with exit code 1
Fabien planned changes to this revision.Jul 24 2020, 14:40
This revision is now accepted and ready to land.Jul 24 2020, 15:35
This revision was automatically updated to reflect the committed changes.