build: address compile issue on Fedora 42#40
Merged
Conversation
The functions `shell_usage()` and `do_clear()` are missing a parameter:
```
glfs-cli.c:96:38: error: initialization of ‘int (*)(struct cli_context *)’ from incompatible pointer type ‘int (*)(void)’ [-Wincompatible-pointer-types]
96 | { .name = "help", .execute = shell_usage },
| ^~~~~~~~~~~
glfs-cli.c:96:38: note: (near initialization for ‘cmds[4].execute’)
glfs-cli.c:67:1: note: ‘shell_usage’ declared here
67 | shell_usage ()
| ^~~~~~~~~~~
```
Adding the (unused) `struct cli_context *` parameters to the functions
makes the compiler happy again.
Fixes: https://bugzilla.redhat.com/2340236
Signed-off-by: Niels de Vos <ndevos@ibm.com>
anoopcs9
approved these changes
Jan 23, 2025
Contributor
anoopcs9
left a comment
There was a problem hiding this comment.
Well, right when I reminded again about the retirement plan on Fedora.
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/4FCPUSDUIS34YLZNHG4CWYIO6KDTXLUJ/.
In any case changes lgtm, thanks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The functions
shell_usage()anddo_clear()are missing a parameter:Adding the (unused)
struct cli_context *parameters to the functions makes the compiler happy again.Fixes: https://bugzilla.redhat.com/2340236