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

Correct compilation errors reported by GCC 10/11 #13103

Merged
merged 1 commit into from
Feb 21, 2022
Merged

Correct compilation errors reported by GCC 10/11 #13103

merged 1 commit into from
Feb 21, 2022

Conversation

szubersk
Copy link
Contributor

Motivation and Context

#12167

Description

New zfs_type_t value ZFS_TYPE_INVALID is introduced.
Variable initialization is now possible to make GCC happy.

Close #12167.

How Has This Been Tested?

$ make

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:

@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Feb 14, 2022
@behlendorf
Copy link
Contributor

This breaks the build on FreeBSD,

  CC       os/freebsd/libzfs_zmount.lo
os/freebsd/libzfs_compat.c:295:10: error: enumeration value 'ZFS_TYPE_INVALID' not handled in switch [-Werror,-Wswitch]
        switch (zhp->zfs_type) {

@szubersk
Copy link
Contributor Author

This breaks the build on FreeBSD,

Thanks for spotting this! Corrected and rebased. As a bonus, I got rid of shadowed errbuf stack variable in lib/libzfs/os/freebsd/libzfs_compat.c (cppcheck complained).

Copy link
Contributor

@behlendorf behlendorf left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for sorting this out.

module/zfs/zcp_get.c Outdated Show resolved Hide resolved
@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Feb 17, 2022
@behlendorf
Copy link
Contributor

@szubersk we're going to need one more rebase. I've just merged #13110 which has a conflict.

@szubersk
Copy link
Contributor Author

@behlendorf, rebased.

@szubersk szubersk requested a review from behlendorf February 19, 2022 15:12
@szubersk
Copy link
Contributor Author

@behlendorf I found 2 more issues: one from Debian bullseye ASan+UBSan, the other one from Debian Bookworm. Most likely other would hit them soon.

New `zfs_type_t` value `ZFS_TYPE_INVALID` is introduced.
Variable initialization is now possible to make GCC happy.

Close #12167.

Signed-off-by: szubersk <[email protected]>
@behlendorf behlendorf merged commit 806739f into openzfs:master Feb 21, 2022
@szubersk szubersk deleted the szubersk-warn branch April 7, 2022 11:02
nicman23 pushed a commit to nicman23/zfs that referenced this pull request Aug 22, 2022
New `zfs_type_t` value `ZFS_TYPE_INVALID` is introduced.
Variable initialization is now possible to make GCC happy.

Reviewed by: Brian Behlendorf <[email protected]>
Signed-off-by: szubersk <[email protected]>
Closes openzfs#12167
Closes openzfs#13103
nicman23 pushed a commit to nicman23/zfs that referenced this pull request Aug 22, 2022
New `zfs_type_t` value `ZFS_TYPE_INVALID` is introduced.
Variable initialization is now possible to make GCC happy.

Reviewed by: Brian Behlendorf <[email protected]>
Signed-off-by: szubersk <[email protected]>
Closes openzfs#12167
Closes openzfs#13103
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Aug 30, 2022
New `zfs_type_t` value `ZFS_TYPE_INVALID` is introduced.
Variable initialization is now possible to make GCC happy.

Reviewed by: Brian Behlendorf <[email protected]>
Signed-off-by: szubersk <[email protected]>
Closes openzfs#12167
Closes openzfs#13103
lundman pushed a commit to openzfsonwindows/openzfs that referenced this pull request Sep 1, 2022
New `zfs_type_t` value `ZFS_TYPE_INVALID` is introduced.
Variable initialization is now possible to make GCC happy.

Reviewed by: Brian Behlendorf <[email protected]>
Signed-off-by: szubersk <[email protected]>
Closes openzfs#12167
Closes openzfs#13103
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
New `zfs_type_t` value `ZFS_TYPE_INVALID` is introduced.
Variable initialization is now possible to make GCC happy.

Reviewed by: Brian Behlendorf <[email protected]>
Signed-off-by: szubersk <[email protected]>
Closes openzfs#12167
Closes openzfs#13103
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
New `zfs_type_t` value `ZFS_TYPE_INVALID` is introduced.
Variable initialization is now possible to make GCC happy.

Reviewed by: Brian Behlendorf <[email protected]>
Signed-off-by: szubersk <[email protected]>
Closes openzfs#12167
Closes openzfs#13103
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
New `zfs_type_t` value `ZFS_TYPE_INVALID` is introduced.
Variable initialization is now possible to make GCC happy.

Reviewed by: Brian Behlendorf <[email protected]>
Signed-off-by: szubersk <[email protected]>
Closes openzfs#12167
Closes openzfs#13103
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
New `zfs_type_t` value `ZFS_TYPE_INVALID` is introduced.
Variable initialization is now possible to make GCC happy.

Reviewed by: Brian Behlendorf <[email protected]>
Signed-off-by: szubersk <[email protected]>
Closes openzfs#12167
Closes openzfs#13103
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
New `zfs_type_t` value `ZFS_TYPE_INVALID` is introduced.
Variable initialization is now possible to make GCC happy.

Reviewed by: Brian Behlendorf <[email protected]>
Signed-off-by: szubersk <[email protected]>
Closes openzfs#12167
Closes openzfs#13103
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

zfs build warnings
2 participants