Skip to content

build: address compile issue on Fedora 42#40

Merged
anoopcs9 merged 1 commit into
gluster:masterfrom
nixpanic:bug/2340236
Jan 23, 2025
Merged

build: address compile issue on Fedora 42#40
anoopcs9 merged 1 commit into
gluster:masterfrom
nixpanic:bug/2340236

Conversation

@nixpanic
Copy link
Copy Markdown
Contributor

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

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>
Copy link
Copy Markdown
Contributor

@anoopcs9 anoopcs9 left a comment

Choose a reason for hiding this comment

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

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.

@anoopcs9 anoopcs9 merged commit 6f86d8f into gluster:master Jan 23, 2025
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