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

fs: Ignore unused-parameter warning in the FS plugin #1028

Merged

Conversation

vojtechtrefny
Copy link
Member

There are some unused parameters in the libext2fs header which together with Wall and Werror means the plugin compilation fails. As a workaround we'll disable the unused-parameter warning for now.

Fixes: #1026

@vojtechtrefny
Copy link
Member Author

Jenkins, test this please.

@vojtechtrefny
Copy link
Member Author

More errors... 🙄

In file included from ext.c:20:
/usr/include/ext2fs/ext2fs.h: In function '__sb_get_tstamp':
/usr/include/ext2fs/ext2fs.h:647:31: error: left shift count >= width of type [-Werror=shift-count-overflow]
  647 |         return ((time_t)(*hi) << 32) | *lo;
      |                               ^~
cc1: all warnings being treated as errors

@vojtechtrefny
Copy link
Member Author

I am a bit less comfortable ignoring the shift-count-overflow warning, but at this point I just want the code to compile everywhere...

There are some unused parameters in the libext2fs header which
together with Wall and Werror means the plugin compilation fails.
As a workaround we'll disable the unused-parameter warning for
now.

Fixes: storaged-project#1026
The warning happens in the libext2fs header.
@vojtechtrefny vojtechtrefny force-pushed the master_ext-no-unused branch from d0b794b to ee5cf5a Compare June 7, 2024 13:27
@vojtechtrefny
Copy link
Member Author

Jenkins, test this please.

@tbzatek
Copy link
Member

tbzatek commented Jun 7, 2024

I am a bit less comfortable ignoring the shift-count-overflow warning, but at this point I just want the code to compile everywhere...

Well you need decide whether to drop -Werror or silence warnings that may still be useful to have.

@dschepler
Copy link

I am a bit less comfortable ignoring the shift-count-overflow warning, but at this point I just want the code to compile everywhere...

Well you need decide whether to drop -Werror or silence warnings that may still be useful to have.

You could use something along the lines of -Wno-error=unused-parameter -Wno-error=shift-count-overflow

@vojtechtrefny vojtechtrefny merged commit 5a9b67f into storaged-project:master Jun 12, 2024
38 of 41 checks passed
vojtechtrefny added a commit to vojtechtrefny/libblockdev that referenced this pull request Jun 12, 2024
Follow-up for storaged-project#1028, we still want to show the warning and not
completely supress it.
vojtechtrefny added a commit that referenced this pull request Jul 24, 2024
Follow-up for #1028, we still want to show the warning and not
completely supress it.
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.

Compilation error due to warnings in ext2fs headers
3 participants