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

refactor: fix compiler warnings #6015

Merged
merged 1 commit into from
Jan 30, 2025

Conversation

scarf005
Copy link
Member

Purpose of change (The Why)

those compiler warnings were annoying and kept hiding other important errors

Describe the solution (The How)

do as the compiler says.

Describe alternatives you've considered

Testing

it builds without errors.

Additional context

[121/495] Building CXX object src/CMakeFiles/cataclysm-bn-tiles-common.dir/character.cpp.o
/var/home/scarf/repo/cata/Cataclysm/src/character.cpp:8767:13: warning: unused variable 'rolls' [-Wunused-variable]
 8767 |         int rolls = 4;
      |             ^~~~~
1 warning generated.
[178/495] Building CXX object src/CMakeFiles/cataclysm-bn-tiles-common.dir/game.cpp.o
/var/home/scarf/repo/cata/Cataclysm/src/game.cpp:8537:31: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned long') [-Wsign-compare]
 8537 |             for( int i = 0; i < disassembly_stacks_res.size(); i++ ) {
      |                             ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
[311/495] Building CXX object src/CMakeFiles/cataclysm-bn-tiles-common.dir/recipe.cpp.o
/var/home/scarf/repo/cata/Cataclysm/src/recipe.cpp:605:20: warning: unused function 'dump_requirements' [-Wunused-function]
  605 | static std::string dump_requirements(
      |                    ^~~~~~~~~~~~~~~~~
1 warning generated.
[346/495] Building CXX object src/CMakeFiles/cataclysm-bn-tiles-common.dir/vehicle_move.cpp.o
/var/home/scarf/repo/cata/Cataclysm/src/vehicle_move.cpp:662:17: warning: unused variable 'weight_factor' [-Wunused-variable]
  662 |     const float weight_factor = mass >= mass2 ?
      |                 ^~~~~~~~~~~~~
1 warning generated.

Checklist

Mandatory

@github-actions github-actions bot added the src changes related to source code. label Jan 30, 2025
@chaosvolt chaosvolt merged commit da03f06 into cataclysmbnteam:main Jan 30, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
src changes related to source code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants