チケット #36527

compile error in decode_macbinary

登録: 2016-08-09 00:40 最終更新: 2016-10-05 23:36

報告者:
担当者:
チケットの種類:
状況:
完了
コンポーネント:
(未割り当て)
マイルストーン:
(未割り当て)
優先度:
5 - 中
重要度:
5 - 中
解決法:
なし
ファイル:
1

詳細

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
次のように修正すべきと思います。
  1. diff -cr lha-master.orig/src/lhext.c lha-master/src/lhext.c
  2. *** lha-master.orig/src/lhext.c 2016-05-07 17:31:02.000000000 +0900
  3. --- lha-master/src/lhext.c 2016-08-08 23:14:16.000000000 +0900
  4. ***************
  5. *** 30,36 ****
  6. static void adjust_dirinfo();
  7. #ifdef HAVE_LIBAPPLEFILE
  8. ! static boolean decode_macbinary(FILE *ofp, size_t size, const char *outPath);
  9. #endif
  10. /* ------------------------------------------------------------------------ */
  11. --- 30,36 ----
  12. static void adjust_dirinfo();
  13. #ifdef HAVE_LIBAPPLEFILE
  14. ! static boolean decode_macbinary(FILE *ofp, off_t size, const char *outPath);
  15. #endif
  16. /* ------------------------------------------------------------------------ */
  17. ***************
  18. *** 736,742 ****
  19. af_file_t *afp = NULL;
  20. FILE *ifp = NULL;
  21. unsigned char *datap;
  22. ! off_t dlen;
  23. if ((afp = af_open(temporary_name)) != NULL) {
  24. /* fetch datafork */
  25. --- 736,742 ----
  26. af_file_t *afp = NULL;
  27. FILE *ifp = NULL;
  28. unsigned char *datap;
  29. ! size_t dlen;
  30. if ((afp = af_open(temporary_name)) != NULL) {
  31. /* fetch datafork */

チケットの履歴 (4 件中 3 件表示)

2016-08-09 00:40 更新者: hirotosakai
  • 新しいチケット "compile error in decode_macbinary" が作成されました
2016-08-09 23:04 更新者: arai
  • 担当者(未割り当て) から arai に更新されました
2016-10-05 23:36 更新者: arai
  • 状況オープン から 完了 に更新されました
  • チケット完了時刻2016-10-05 23:36 に更新されました

添付ファイルリスト

編集

ログインしていません。ログインしていない状態では、コメントに記載者の記録が残りません。 » ログインする