At least ports/archivers/fuse-zip fails to build with clang 6, because
of stricter diagnostics:
-->8--
c++ -c -O2 -pipe -I/usr/local/include main.cpp \
-Ilib \
-o main.o
main.cpp:138:5: error: constant expression evaluates to -1 which cannot be
narrowed to type 'unsigned long' [-Wc++11-narrowing]
FUSE_OPT_KEY("-h", KEY_HELP),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/fuse_opt.h:51:33: note: expanded from macro 'FUSE_OPT_KEY'
#define FUSE_OPT_KEY(t, k) { t, -1, k }
^~
main.cpp:138:5: note: insert an explicit cast to silence this issue
FUSE_OPT_KEY("-h", KEY_HELP),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--8<--
Full log at:
https://junkpile.org/p/failures/i386-20180407/archivers/fuse-zip.log
Proposed fix below. ok?
Index: fuse_opt.h
===================================================================
RCS file: /d/cvs/src/lib/libfuse/fuse_opt.h,v
retrieving revision 1.4
diff -u -p -p -u -r1.4 fuse_opt.h
--- fuse_opt.h 20 May 2014 13:22:06 -0000 1.4
+++ fuse_opt.h 7 Apr 2018 19:28:55 -0000
@@ -48,7 +48,7 @@ int fuse_opt_parse(struct fuse_args *, v
#define FUSE_OPT_IS_OPT_KEY(t) (t->off == (unsigned long)-1)
-#define FUSE_OPT_KEY(t, k) { t, -1, k }
+#define FUSE_OPT_KEY(t, k) { t, (unsigned long)-1, k }
#define FUSE_OPT_END { NULL, 0, 0 }
#define FUSE_OPT_KEY_OPT -1
#define FUSE_OPT_KEY_NONOPT -2
--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE