* Paul Menzel <[email protected]> [130409 00:51]: > Dear coreboot folks, > > > if somebody is bored ;-), here is the output of Cppcheck for cbfstool to > fix. :P
Since you already started looking into the issue, maybe you can save the rest of us some time by following through with it yourself. A smart person once said: > And that is in my opinion disrespectful considering the time of others > less valuable than ones own. > $ cppcheck --enable=all . > Checking cbfs-mkpayload.c... > Checking cbfs-mkpayload.c: __APPLE__... Not sure what the above message implies. You should probably report these to the authors of the LZMA SDK instead: > [lzma/C/LzmaDec.c:673]: (style) Variable 'range' is assigned a value > that is never used. > [lzma/C/LzmaDec.c:673]: (style) Variable 'code' is assigned a value > that is never used. > [lzma/C/LzmaEnc.c:1345]: (style) The scope of the variable > 'nextRepMatchPrice' can be reduced. > [lzma/C/LzmaEnc.c:1435]: (style) The scope of the variable > 'nextRepMatchPrice' can be reduced. > [lzma/C/LzmaEnc.c:2164]: (style) Variable 'allocaDummy' is assigned a > value that is never used. > [lzma/C/LzmaEnc.c:398] -> [lzma/C/LzmaEnc.c:398]: (style) Same > expression on both sides of '||'. > [lzma/C/LzmaEnc.c:807]: (warning) %d in format string (no. 1) > requires a signed integer given in the argument list. > [lzma/C/LzmaEnc.c:1775]: (warning) %d in format string (no. 2) > requires a signed integer given in the argument list. > [lzma/C/LzmaEnc.c:1775]: (warning) %d in format string (no. 3) > requires a signed integer given in the argument list. > [lzma/C/LzmaEnc.c:1115]: (style) Unsigned variable 'position' can't > be negative so it is unnecessary to test it. > [lzma/C/LzmaEnc.c:2083]: (warning) Redundant assignment of 'pp' to > itself. > [lzma/C/LzmaEnc.c:2083]: (warning) Assignment of function parameter > has no effect outside the function. > [lzma/C/LzFind.c:495]: (style) The function > 'Bt3Zip_MatchFinder_GetMatches' is never used. > [lzma/C/LzFind.c:660]: (style) The function 'Bt3Zip_MatchFinder_Skip' > is never used. > [lzma/C/LzFind.c:635]: (style) The function > 'Hc3Zip_MatchFinder_GetMatches' is never used. > [lzma/C/LzFind.c:721]: (style) The function 'Hc3Zip_MatchFinder_Skip' > is never used. > [lzma/C/LzmaDec.c:947]: (style) The function 'LzmaDec_Allocate' is > never used. > [lzma/C/LzmaDec.c:840]: (style) The function 'LzmaDec_DecodeToBuf' is > never used. > [lzma/C/LzmaDec.c:892]: (style) The function 'LzmaDec_Free' is never > used. > [lzma/C/LzmaEnc.c:76]: (style) The function > 'LzmaEncProps_GetDictSize' is never used. > [lzma/C/LzmaEnc.c:2250]: (style) The function 'LzmaEncode' is never > used. > [lzma/C/LzFind.c:108]: (style) The function > 'MatchFinder_ReadIfRequired' is never used. These should probably be looked at... > [cbfs-mkstage.c:170]: (error) Memory leak: buffer > [common.c:36] -> [common.c:37]: (style) Mismatching assignment and > comparison, comparison 'inttest_lsb==18' is always false. > [common.c:141]: (error) Resource leak: file > [common.c:270]: (error) Resource leak: file > [common.c:497]: (style) The function 'add_file_to_cbfs' is never used. > [common.c:791]: (style) The function 'cbfs_find_location' is never > used. > [cbfs_image.c:782]: (style) The function 'cbfs_init_entry' is never > used. > [common.c:630]: (style) The function 'create_cbfs_file' is never used. > [common.c:666]: (style) The function 'create_cbfs_image' is never > used. > [lzma/lzma.c:169]: (style) The function 'do_lzma_uncompress' is never > used. > [common.c:438]: (style) The function 'extract_file_from_cbfs' is > never used. > [cbfs_image.c:102]: (style) The function 'get_cbfs_compression' is > never used. > [cbfs_image.c:92]: (style) The function 'get_cbfs_entry_type' is > never used. > [common.c:106]: (style) The function 'getfilesize' is never used. > [cbfs-mkstage.c:31]: (style) The function 'idemp' is never used. > [common.c:348]: (style) The function 'print_cbfs_directory' is never > used. > [common.c:597]: (style) The function 'remove_file_from_cbfs' is never > used. Stefan -- coreboot mailing list: [email protected] http://www.coreboot.org/mailman/listinfo/coreboot

