compile error in decode_macbinary
applefileが利用可能な場合、下記のコンパイルエラーが出ます。
lhext.c:731:1: error: conflicting types for 'decode_macbinary' decode_macbinary(ofp, size, outPath) ^ lhext.c:33:16: note: previous declaration is here static boolean decode_macbinary(FILE *ofp, size_t size, const char *outPath); ^ lhext.c:743:30: warning: incompatible pointer types passing 'off_t *' (aka 'long long *') to parameter of type 'size_t *' (aka 'unsigned long *') [-Wincompatible-pointer-types] datap = af_data(afp, &dlen); ^~~~~ /usr/local/include/applefile.h:31:42: note: passing argument to parameter 'plen' here void * af_data(af_file_t * paf, size_t * plen); ^ 1 warning and 1 error generated. make: *** [lhext.o] Error 1
diff -cr lha-master.orig/src/lhext.c lha-master/src/lhext.c *** lha-master.orig/src/lhext.c 2016-05-07 17:31:02.000000000 +0900 --- lha-master/src/lhext.c 2016-08-08 23:14:16.000000000 +0900 *************** *** 30,36 **** static void adjust_dirinfo(); #ifdef HAVE_LIBAPPLEFILE ! static boolean decode_macbinary(FILE *ofp, size_t size, const char *outPath); #endif /* ------------------------------------------------------------------------ */ --- 30,36 ---- static void adjust_dirinfo(); #ifdef HAVE_LIBAPPLEFILE ! static boolean decode_macbinary(FILE *ofp, off_t size, const char *outPath); #endif /* ------------------------------------------------------------------------ */ *************** *** 736,742 **** af_file_t *afp = NULL; FILE *ifp = NULL; unsigned char *datap; ! off_t dlen; if ((afp = af_open(temporary_name)) != NULL) { /* fetch datafork */ --- 736,742 ---- af_file_t *afp = NULL; FILE *ifp = NULL; unsigned char *datap; ! size_t dlen; if ((afp = af_open(temporary_name)) != NULL) { /* fetch datafork */
applefileが利用可能な場合、下記のコンパイルエラーが出ます。
次のように修正すべきと思います。