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

clang fixes #929

Merged
merged 4 commits into from
Jul 4, 2023
Merged

clang fixes #929

merged 4 commits into from
Jul 4, 2023

Conversation

tbzatek
Copy link
Member

@tbzatek tbzatek commented Jul 3, 2023

The last commit deserves some testing.

Fixes #925

tbzatek added 4 commits July 3, 2023 16:04
loop.c:151:23: error: unused variable 'sys_path' [-Werror,-Wunused-variable]
    g_autofree gchar *sys_path = NULL;
crypto.c:749:40: error: redefinition of typedef 'BDCryptoKeyslotContext' is a C11 feature [-Werror,-Wtypedef-redefinition]
typedef struct _BDCryptoKeyslotContext BDCryptoKeyslotContext;
                                       ^
./crypto.h:234:40: note: previous definition is here
typedef struct _BDCryptoKeyslotContext BDCryptoKeyslotContext;
                                       ^
Turned out this was a private struct and these two static-const-array
cross-references were not really needed.

generic.c:185:52: error: initializer element is not a compile-time constant
      .mkfs_options = fs_features[BD_FS_TECH_EXT2].mkfs,
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
generic.c:187:51: error: initializer element is not a compile-time constant
      .resize_mode = fs_features[BD_FS_TECH_EXT2].resize,
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
Copy link
Member

@vojtechtrefny vojtechtrefny 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 to me.

@vojtechtrefny vojtechtrefny merged commit fc0b696 into storaged-project:master Jul 4, 2023
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.

plugins/fs/generic.c fails to build with clang - invalid C
2 participants