1
0
mirror of https://github.com/Zygo/bees.git synced 2025-07-06 10:32:25 +02:00
Files
bees/src
Zygo Blaxell ee5c971d77 fsync: fix signed comparison of stf.f_type
Build fails on 32-bit Slackware because GCC 11's `-Werror=sign-compare`
is stricter than necessary:

	cc -Wall -Wextra -Werror -O3 -I../include -D_FILE_OFFSET_BITS=64 -std=c99 -O2 -march=i586 -mtune=i686 -o bees-version.o -c bees-version.c
	bees.cc: In function 'void bees_fsync(int)':
	bees.cc:426:24: error: comparison of integer expressions of different signedness: '__fsword_t' {aka 'int'} and 'unsigned int' [-Werror=sign-compare]
	  426 |         if (stf.f_type != BTRFS_SUPER_MAGIC) {
	      |                        ^

To work around this, cast `stf.f_type` to the same type as
`BTRFS_SUPER_MAGIC`, so it has the same number of bits that we're looking
for in the magic value.

Fixes: https://github.com/Zygo/bees/issues/317
Signed-off-by: Zygo Blaxell <bees@furryterror.org>
2025-07-03 21:48:40 -04:00
..
2025-06-18 21:17:48 -04:00
2025-06-18 23:06:14 -04:00
2023-01-27 22:16:02 -05:00