storaged-project / libblockdev

A library for manipulating block devices.
GNU Lesser General Public License v2.1
103 stars 54 forks source link

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

Closed vojtechtrefny closed 3 months ago

vojtechtrefny commented 3 months ago

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 commented 3 months ago

Jenkins, test this please.

vojtechtrefny commented 3 months ago

More errors... :roll_eyes:

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 commented 3 months ago

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

vojtechtrefny commented 3 months ago

Jenkins, test this please.

tbzatek commented 3 months ago

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 commented 3 months ago

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