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

Some warnings when compiling with g++ 12 #128

Open
correaa opened this issue Jan 5, 2023 · 0 comments
Open

Some warnings when compiling with g++ 12 #128

correaa opened this issue Jan 5, 2023 · 0 comments

Comments

@correaa
Copy link

correaa commented Jan 5, 2023

09:42:59 correaa@pro build ±|master|→ cmake ..
-- The CXX compiler identification is GNU 12.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
...
-- Build files have been written to: /home/correaa/expected/build
09:43:06 correaa@pro build ±|master|→ make
[  7%] Building CXX object CMakeFiles/tl-expected-tests.dir/tests/assignment.cpp.o
/home/correaa/expected/tests/assignment.cpp: In function ‘void C_A_T_C_H_T_E_S_T_2()’:
/home/correaa/expected/tests/assignment.cpp:72:42: warning: variable ‘e3’ set but not used [-Wunused-but-set-variable]
   72 |   tl::expected<except_move, except_move> e3 = {};
      |                                          ^~
/home/correaa/expected/tests/assignment.cpp:73:42: warning: variable ‘e4’ set but not used [-Wunused-but-set-variable]
   73 |   tl::expected<except_move, except_move> e4 = {};
      |                                          ^~
[ 15%] Building CXX object CMakeFiles/tl-expected-tests.dir/tests/bases.cpp.o
[ 23%] Building CXX object CMakeFiles/tl-expected-tests.dir/tests/constexpr.cpp.o
[ 30%] Building CXX object CMakeFiles/tl-expected-tests.dir/tests/constructors.cpp.o
[ 38%] Building CXX object CMakeFiles/tl-expected-tests.dir/tests/emplace.cpp.o
[ 46%] Building CXX object CMakeFiles/tl-expected-tests.dir/tests/extensions.cpp.o
[ 53%] Building CXX object CMakeFiles/tl-expected-tests.dir/tests/issues.cpp.o
/home/correaa/expected/tests/issues.cpp: In function ‘MaybeDataPtr test(int)’:
/home/correaa/expected/tests/issues.cpp:117:19: warning: redundant move in return statement [-Wredundant-move]
  117 |   return std::move(i);
      |          ~~~~~~~~~^~~
/home/correaa/expected/tests/issues.cpp:117:19: note: remove ‘std::move’ call
/home/correaa/expected/tests/issues.cpp: In function ‘MaybeDataPtr test2(int)’:
/home/correaa/expected/tests/issues.cpp:122:19: warning: redundant move in return statement [-Wredundant-move]
  122 |   return std::move(i);
      |          ~~~~~~~~~^~~
/home/correaa/expected/tests/issues.cpp:122:19: note: remove ‘std::move’ call
/home/correaa/expected/tests/issues.cpp: In copy constructor ‘move_tracker::move_tracker(const move_tracker&)’:
/home/correaa/expected/tests/issues.cpp:145:42: warning: unused parameter ‘other’ [-Wunused-parameter]
  145 |         move_tracker(move_tracker const &other) noexcept {};
      |                      ~~~~~~~~~~~~~~~~~~~~^~~~~
/home/correaa/expected/tests/issues.cpp: In member function ‘move_tracker& move_tracker::operator=(const move_tracker&)’:
/home/correaa/expected/tests/issues.cpp:150:56: warning: no return statement in function returning non-void [-Wreturn-type]
  150 |         operator=(move_tracker const &other) noexcept {};
      |                                                        ^
      |                                                        return *this;
/home/correaa/expected/tests/issues.cpp:150:39: warning: unused parameter ‘other’ [-Wunused-parameter]
  150 |         operator=(move_tracker const &other) noexcept {};
      |                   ~~~~~~~~~~~~~~~~~~~~^~~~~
[ 61%] Building CXX object CMakeFiles/tl-expected-tests.dir/tests/main.cpp.o
[ 69%] Building CXX object CMakeFiles/tl-expected-tests.dir/tests/noexcept.cpp.o
[ 76%] Building CXX object CMakeFiles/tl-expected-tests.dir/tests/observers.cpp.o
[ 84%] Building CXX object CMakeFiles/tl-expected-tests.dir/tests/relops.cpp.o
[ 92%] Building CXX object CMakeFiles/tl-expected-tests.dir/tests/swap.cpp.o
[100%] Linking CXX executable tl-expected-tests
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