markfasheh / duperemove

Tools for deduping file systems
GNU General Public License v2.0
689 stars 75 forks source link

clang build no longer passes #297

Closed matthiaskrgr closed 9 months ago

matthiaskrgr commented 12 months ago
clang -Wall -ggdb -O2 -D_FILE_OFFSET_BITS=64 -DVERSTRING=\"v0.12-11-gd5a7\" -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -pthread   -rdynamic  -DIS_RELEASE=0   -c -o duperemove.o duperemove.c
clang-15: warning: argument unused during compilation: '-rdynamic' [-Wunused-command-line-argument]
In file included from duperemove.c:42:
./memstats.h:35:52: error: expected expression
                                      unsigned long long count, GMutex *mutex [[maybe_unused]])
                                                                               ^
./memstats.h:48:26: error: expected expression
                                      GMutex *mutex [[maybe_unused]])
                                                     ^
2 errors generated.
JackSlateur commented 11 months ago

Hello @matthiaskrgr

Thank you for this report The maybe_unused is part of the C23 standard, and while it is not supported for clang-15, clang-17 has it:

0.21 [jack:~/git/duperemove] clang-17 -DVERSTRING=\"v0.12-27-g0e27-dirty\" -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DIS_RELEASE=0 -c -o duperemove.o duperemove.c

That version is currently in rc and should be release in september 2023

JackSlateur commented 9 months ago

LLVM 17 has been release as planned

This project can now be fully compiled using make with this version