Menu

#153 mingw compile errors

open
None
5
2010-08-19
2010-07-08
No

From Simson Garfinkel:
Version 3.1.3 generates these compilation errors with mingw running on Linux:

fs_fname_apis.cpp: In function `int test_fat12()':
fs_fname_apis.cpp:366: error: cannot convert `char*' to `const TSK_TCHAR*' for argument `1' to `TSK_IMG_INFO* tsk_img_open_sing(const TSK_TCHAR*, TSK_IMG_TYPE_ENUM, unsigned int)'
fs_fname_apis.cpp: In function `int test_ntfs_fe()':
fs_fname_apis.cpp:404: error: cannot convert `char*' to `const TSK_TCHAR*' for argument `1' to `TSK_IMG_INFO* tsk_img_open_sing(const TSK_TCHAR*, TSK_IMG_TYPE_ENUM, unsigned int)'
read_apis.cpp: In function `int test_fat12()':
read_apis.cpp:210: error: cannot convert `char*' to `const TSK_TCHAR*' for argument `1' to `TSK_IMG_INFO* tsk_img_open_sing(const TSK_TCHAR*, TSK_IMG_TYPE_ENUM, unsigned int)'fs_attrlist_apis.cpp: In function `int test_fat12()':
fs_attrlist_apis.cpp:202: error: cannot convert `char*' to `const TSK_TCHAR*' for argument `1' to `TSK_IMG_INFO* tsk_img_open_sing(const TSK_TCHAR*, TSK_IMG_TYPE_ENUM, unsigned int)'

read_apis.cpp: In function `int test_fat_slack()':
read_apis.cpp:249: error: cannot convert `char*' to `const TSK_TCHAR*' for argument `1' to `TSK_IMG_INFO* tsk_img_open_sing(const TSK_TCHAR*, TSK_IMG_TYPE_ENUM, unsigned int)'
fs_attrlist_apis.cpp: In function `int test_ntfs_fe()':
fs_attrlist_apis.cpp:241: error: cannot convert `char*' to `const TSK_TCHAR*' for argument `1' to `TSK_IMG_INFO* tsk_img_open_sing(const TSK_TCHAR*, TSK_IMG_TYPE_ENUM, unsigned int)'
read_apis.cpp: In function `int test_fat_recover()':
read_apis.cpp:343: error: cannot convert `char*' to `const TSK_TCHAR*' for argument `1' to `TSK_IMG_INFO* tsk_img_open_sing(const TSK_TCHAR*, TSK_IMG_TYPE_ENUM, unsigned int)'
read_apis.cpp: In function `int test_ntfs_slack_ads()':
read_apis.cpp:483: error: cannot convert `char*' to `const TSK_TCHAR*' for argument `1' to `TSK_IMG_INFO* tsk_img_open_sing(const TSK_TCHAR*, TSK_IMG_TYPE_ENUM, unsigned int)'
read_apis.cpp: In function `int test_ntfs_fe()':
read_apis.cpp:644: error: cannot convert `char*' to `const TSK_TCHAR*' for argument `1' to `TSK_IMG_INFO* tsk_img_open_sing(const TSK_TCHAR*, TSK_IMG_TYPE_ENUM, unsigned int)'
read_apis.cpp: In function `int test_ntfs_comp()':
read_apis.cpp:682: error: cannot convert `char*' to `const TSK_TCHAR*' for argument `1' to `TSK_IMG_INFO* tsk_img_open_sing(const TSK_TCHAR*, TSK_IMG_TYPE_ENUM, unsigned int)'

These are all trivially fixed by putting a (const TSK_TCHAR *) before the fname arguments.

I am also seeing these errors which are not so trivial to fix:

ewf.c: In function `ewf_open':
ewf.c:147: warning: implicit declaration of function `libewf_check_file_signature_wide'
ewf.c:163: warning: implicit declaration of function `libewf_open_wide'
ewf.c:163: warning: assignment makes pointer from integer without a cast

hfs_dent.c: In function `hfs_uni2ascii':
hfs_dent.c:121: warning: dereferencing type-punned pointer will break strict-aliasing rules
hfs_dent.c:122: warning: dereferencing type-punned pointer will break strict-aliasing rules

Discussion

  • Brian Carrier

    Brian Carrier - 2010-08-13
    • assigned_to: nobody --> anthonylawrence
     
  • Brian Carrier

    Brian Carrier - 2010-08-19

    First part of patch is in:
    Sending trunk/tests/fs_attrlist_apis.cpp
    Sending trunk/tests/fs_fname_apis.cpp
    Sending trunk/tests/read_apis.cpp
    Transmitting file data ...
    Committed revision 238.

    Need to look at ewf_open warning.

     
  • Brian Carrier

    Brian Carrier - 2010-08-19
    • assigned_to: anthonylawrence --> carrier
     
  • Brian Carrier

    Brian Carrier - 2010-09-11

    Addressed hfs_dent issues (I think):

    Sending trunk/tsk3/fs/hfs_dent.c
    Transmitting file data .
    Committed revision 250.

    The libewf warnings could be because of how mingw defines wide characters and such... Need to try this setup.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.