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

Quash gcc-13 -Werror due to ent->d_name always being non-NULL #182

Closed
wants to merge 1 commit into from

Conversation

jedbrown
Copy link

Requirements for Adding, Changing, Fixing or Removing a Feature

Fill out the template below. Any pull request that does not include enough
information to be reviewed in a timely manner may be closed at the maintainers'
discretion.

Description of the Change

d_name is an array member, not a pointer, so it's never NULL. It can be the empty string, in which case d_name[0] should be '\0'. This fixes the -Werror build failure when using gcc-13.

Alternate Designs

Could simplify to if (!ent) break;.

Regressions

build succeeds

Verification Process

I compiled and ran.

d_name is an array member, not a pointer, so it's never NULL. It can be
the empty string, in which case d_name[0] should be '\0'.
@P403n1x87
Copy link
Owner

@jedbrown thanks for putting this together. I think this has been fixed already on the devel branch with #177. Is this a blocker for you or would it be ok to wait until the next release, when the devel branch will be merged into the main one? This should hopefully happen before or by October the latest.

@jedbrown
Copy link
Author

It's your project. The packaged build on Archlinux failed so I cloned the repo and got it working with this patch (and a link hack building austinp because I was too lazy to fix the right way). If you want to keep master as the default branch and let the build on master keep failing for the next few months, it doesn't bother me, but you're going to discourage some potential users and get more support noise. Maybe you should cherry-pick #177. In any case, feel free to close this.

@P403n1x87
Copy link
Owner

It's your project. The packaged build on Archlinux failed so I cloned the repo and got it working with this patch

Ah I see. Thanks for the context, I was not aware of the failing builds on Arch.

Maybe you should cherry-pick #177.

Yep, given the issue with Arch, it makes sense to cherry-pick that change. Thanks again for reporting this!

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.

2 participants