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

Remove set but not used variable in ddt.c #16522

Merged
merged 1 commit into from
Sep 10, 2024
Merged

Conversation

mcmilk
Copy link
Contributor

@mcmilk mcmilk commented Sep 10, 2024

Description

While testing the qemu runners, FreeBSD does not build the module right now.

This is the error we have:

  --- ddt.o ---
886
  /usr/home/zfs/zfs/module/zfs/ddt.c:2612:6: error: variable 'total' set but not used [-Werror,-Wunused-but-set-variable]
887
   2612 |         int total = 0, valid = 0;
888
        |             ^
889
  1 error generated.
890
  *** [ddt.o] Error code 1

@don-brady: I removed this (testing?) variable.

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

module/zfs/ddt.c:2612:6: error: variable 'total' set but not used

Signed-off-by: Tino Reichardt <[email protected]>
Copy link
Member

@amotin amotin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure whether total or valid use would look more correct in the debug message, the only place they are used, but counting both indeed seems redundant.

@tonyhutter tonyhutter merged commit 1713aa7 into openzfs:master Sep 10, 2024
23 checks passed
@mcmilk mcmilk deleted the fix-ddt.c branch September 13, 2024 17:20
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

Successfully merging this pull request may close these issues.

3 participants