Re: [sleuthkit-developers] [sleuthkit-users] compile warnings with TSK 3.0.1
Brought to you by:
carrier
From: Brian C. <ca...@sl...> - 2009-03-02 23:26:48
|
Thanks Simson. I fixed the fatfs, ntfs, and dls_lib ones. I hadn't seen those before. The other ones I've seen before, but do not have a good solution for them. They exist because TSK has typedefs for the offset and address types and a corresponding #define values for printing the values in printf statements. For example: typedef int64_t TSK_OFF_T; #define PRIuOFF PRIu64 C++ compilers keep track of types better then the C compilers and they complain that TSK_OFF_T is its own type, but that PRIuOFF is for a long long (or something). I haven't found a way to fix these warnings. Any ideas? brian On Feb 26, 2009, at 5:44 PM, Simson Garfinkel wrote: > Compiling SleuthKit 3.0.1 on 64-bit Ubuntu generates a whole bunch of > compile warnings. Most of these look harmless, but the ones in > fatfs.c may be of concern. > > fatfs.c:777: warning: array subscript is above array bounds > fatfs.c:777: warning: array subscript is above array bounds > fatfs.c:777: warning: array subscript is above array bounds > fatfs.c:817: warning: array subscript is above array bounds > fatfs.c:817: warning: array subscript is above array bounds > fatfs.c:817: warning: array subscript is above array bounds > ntfs.c:3640: warning: array subscript is above array bounds > ntfs.c:3723: warning: array subscript is above array bounds > ntfs.c:1620: warning: array subscript is above array bounds > ntfs.c:1997: warning: array subscript is above array bounds > dls_lib.c:129: warning: ignoring return value of 'fwrite', declared > with attribute warn_unused_result > dls_lib.c:135: warning: ignoring return value of 'fwrite', declared > with attribute warn_unused_result > disk_stat.cpp:83: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 2 has type ‘uint64_t’ > disk_stat.cpp:84: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 2 has type ‘uint64_t’ > disk_stat.cpp:88: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 2 has type ‘long unsigned int’ > disk_stat.cpp:88: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 3 has type ‘uint64_t’ > disk_sreset.cpp:94: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 2 has type ‘long unsigned int’ > disk_sreset.cpp:94: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 3 has type ‘uint64_t’ > read_apis.cpp:44: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 3 has type ‘TSK_OFF_T’ > read_apis.cpp:44: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 4 has type ‘TSK_OFF_T’ > read_apis.cpp:66: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 3 has type ‘TSK_OFF_T’ > read_apis.cpp:66: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 4 has type ‘TSK_OFF_T’ > read_apis.cpp:83: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 3 has type ‘TSK_OFF_T’ > read_apis.cpp:83: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 4 has type ‘TSK_OFF_T’ > read_apis.cpp:91: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 3 has type ‘TSK_OFF_T’ > read_apis.cpp:91: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 4 has type ‘TSK_INUM_T’ > read_apis.cpp:106: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 3 has type ‘TSK_OFF_T’ > read_apis.cpp:113: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 3 has type ‘TSK_DADDR_T’ > read_apis.cpp:122: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 3 has type ‘TSK_DADDR_T’ > read_apis.cpp:122: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 4 has type ‘TSK_INUM_T’ > read_apis.cpp:131: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 3 has type ‘TSK_OFF_T’ > read_apis.cpp:142: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 3 has type ‘TSK_OFF_T’ > read_apis.cpp:151: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 3 has type ‘TSK_OFF_T’ > read_apis.cpp:151: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 4 has type ‘TSK_INUM_T’ > read_apis.cpp:173: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 3 has type ‘TSK_INUM_T’ > read_apis.cpp:179: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 3 has type ‘TSK_INUM_T’ > read_apis.cpp:186: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 3 has type ‘TSK_INUM_T’ > read_apis.cpp:205: warning: deprecated conversion from string constant > to ‘char*’ > read_apis.cpp:243: warning: deprecated conversion from string constant > to ‘char*’ > read_apis.cpp:278: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 3 has type ‘TSK_OFF_T’ > read_apis.cpp:338: warning: deprecated conversion from string constant > to ‘char*’ > read_apis.cpp:366: warning: deprecated conversion from string constant > to ‘char*’ > read_apis.cpp:379: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 4 has type ‘TSK_OFF_T’ > read_apis.cpp:414: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 3 has type ‘TSK_INUM_T’ > read_apis.cpp:414: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 4 has type ‘TSK_INUM_T’ > read_apis.cpp:414: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 5 has type ‘TSK_INUM_T’ > read_apis.cpp:481: warning: deprecated conversion from string constant > to ‘char*’ > read_apis.cpp:516: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 3 has type ‘TSK_OFF_T’ > read_apis.cpp:583: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 3 has type ‘TSK_OFF_T’ > read_apis.cpp:600: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 3 has type ‘long int’ > read_apis.cpp:616: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 3 has type ‘long int’ > read_apis.cpp:632: warning: deprecated conversion from string constant > to ‘char*’ > read_apis.cpp:672: warning: deprecated conversion from string constant > to ‘char*’ > fs_fname_apis.cpp:47: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 3 has type ‘long unsigned int’ > fs_fname_apis.cpp:47: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 4 has type ‘long unsigned int’ > fs_fname_apis.cpp:115: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 3 has type ‘TSK_INUM_T’ > fs_fname_apis.cpp:126: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 3 has type ‘TSK_INUM_T’ > fs_fname_apis.cpp:135: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 3 has type ‘TSK_INUM_T’ > fs_fname_apis.cpp:148: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 4 has type ‘TSK_INUM_T’ > fs_fname_apis.cpp:157: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 4 has type ‘TSK_INUM_T’ > fs_fname_apis.cpp:166: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 3 has type ‘TSK_INUM_T’ > fs_fname_apis.cpp:206: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 3 has type ‘TSK_INUM_T’ > fs_fname_apis.cpp:242: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 4 has type ‘TSK_INUM_T’ > fs_fname_apis.cpp:242: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 5 has type ‘TSK_INUM_T’ > fs_fname_apis.cpp:253: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 3 has type ‘TSK_INUM_T’ > fs_fname_apis.cpp:253: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 4 has type ‘TSK_INUM_T’ > fs_fname_apis.cpp:253: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 6 has type ‘TSK_INUM_T’ > fs_fname_apis.cpp:263: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 3 has type ‘TSK_INUM_T’ > fs_fname_apis.cpp:263: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 5 has type ‘TSK_INUM_T’ > fs_fname_apis.cpp:274: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 6 has type ‘TSK_INUM_T’ > fs_fname_apis.cpp:291: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 3 has type ‘TSK_INUM_T’ > fs_fname_apis.cpp:301: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 3 has type ‘TSK_INUM_T’ > fs_fname_apis.cpp:322: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 4 has type ‘TSK_INUM_T’ > fs_fname_apis.cpp:332: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 4 has type ‘TSK_INUM_T’ > fs_fname_apis.cpp:362: warning: deprecated conversion from string > constant to ‘char*’ > fs_fname_apis.cpp:402: warning: deprecated conversion from string > constant to ‘char*’ > fs_attrlist_apis.cpp:34: warning: format ‘%llu’ expects type ‘long > long unsigned int’, but argument 3 has type ‘TSK_INUM_T’ > fs_attrlist_apis.cpp:43: warning: format ‘%llu’ expects type ‘long > long unsigned int’, but argument 4 has type ‘TSK_INUM_T’ > fs_attrlist_apis.cpp:67: warning: format ‘%llu’ expects type ‘long > long unsigned int’, but argument 3 has type ‘TSK_INUM_T’ > fs_attrlist_apis.cpp:75: warning: format ‘%llu’ expects type ‘long > long unsigned int’, but argument 3 has type ‘TSK_INUM_T’ > fs_attrlist_apis.cpp:86: warning: format ‘%llu’ expects type ‘long > long unsigned int’, but argument 4 has type ‘TSK_INUM_T’ > fs_attrlist_apis.cpp:95: warning: format ‘%llu’ expects type ‘long > long unsigned int’, but argument 5 has type ‘TSK_INUM_T’ > fs_attrlist_apis.cpp:103: warning: format ‘%llu’ expects type ‘long > long unsigned int’, but argument 7 has type ‘TSK_INUM_T’ > fs_attrlist_apis.cpp:110: warning: format ‘%llu’ expects type ‘long > long unsigned int’, but argument 5 has type ‘TSK_INUM_T’ > fs_attrlist_apis.cpp:119: warning: format ‘%llu’ expects type ‘long > long unsigned int’, but argument 4 has type ‘TSK_INUM_T’ > fs_attrlist_apis.cpp:126: warning: format ‘%llu’ expects type ‘long > long unsigned int’, but argument 5 has type ‘TSK_INUM_T’ > fs_attrlist_apis.cpp:135: warning: format ‘%llu’ expects type ‘long > long unsigned int’, but argument 4 has type ‘TSK_INUM_T’ > fs_attrlist_apis.cpp:141: warning: format ‘%llu’ expects type ‘long > long unsigned int’, but argument 5 has type ‘TSK_INUM_T’ > fs_attrlist_apis.cpp:151: warning: format ‘%llu’ expects type ‘long > long unsigned int’, but argument 4 has type ‘TSK_INUM_T’ > fs_attrlist_apis.cpp:157: warning: format ‘%llu’ expects type ‘long > long unsigned int’, but argument 5 has type ‘TSK_INUM_T’ > fs_attrlist_apis.cpp:177: warning: deprecated conversion from string > constant to ‘char*’ > fs_attrlist_apis.cpp:218: warning: deprecated conversion from string > constant to ‘char*’ > posix-style.cpp:66: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 3 has type ‘TSK_INUM_T’ > posix-style.cpp:93: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 4 has type ‘TSK_INUM_T’ > posix-style.cpp:214: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 3 has type ‘TSK_OFF_T’ > posix-style.cpp:229: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 3 has type ‘TSK_OFF_T’ > callback-style.cpp:94: warning: format ‘%llu’ expects type ‘long long > unsigned int’, but argument 4 > ---------------------------------------------------------------------- > -------- > Open Source Business Conference (OSBC), March 24-25, 2009, San > Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the > Enterprise > -Strategies to boost innovation and cut costs with open source > participation > -Receive a $600 discount off the registration fee with the source > code: SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > sleuthkit-users mailing list > https://lists.sourceforge.net/lists/listinfo/sleuthkit-users > http://www.sleuthkit.org |