diff --git a/tools/autotools/tsk_comparedir.cpp b/tools/autotools/tsk_comparedir.cpp index 89e2af91527627df692ba0b4f4e8727693fea501..81e52691d8fea3f0fb075560cb8b2fb8354fde31 100644 --- a/tools/autotools/tsk_comparedir.cpp +++ b/tools/autotools/tsk_comparedir.cpp @@ -283,7 +283,7 @@ uint8_t if (processLclDir(_TSK_T(""))) return 1; - if (!m_missDirFile) { + if (m_missDirFile == false) { printf("All files in directory found in image\n"); } @@ -292,7 +292,7 @@ uint8_t } else { std::set < char *, ltstr >::iterator it; - for (it = m_filesInImg.begin(); it != m_filesInImg.end(); it++) + for (it = m_filesInImg.begin(); it != m_filesInImg.end(); ++it) printf("file: %s not found in directory\n", (TSK_TCHAR *) * it); } diff --git a/tools/autotools/tsk_recover.cpp b/tools/autotools/tsk_recover.cpp index ffcba517d8347bf6e7a34d21d9aa83db70b29eea..7a3e8e2f2ab9403d57296f2974b60b22ccea0353 100644 --- a/tools/autotools/tsk_recover.cpp +++ b/tools/autotools/tsk_recover.cpp @@ -50,7 +50,7 @@ usage() class TskRecover:public TskAuto { public: - TskRecover(TSK_TCHAR * a_base_dir); + explicit TskRecover(TSK_TCHAR * a_base_dir); virtual TSK_RETVAL_ENUM processFile(TSK_FS_FILE * fs_file, const char *path); virtual TSK_FILTER_ENUM filterVol(const TSK_VS_PART_INFO * vs_part); virtual TSK_FILTER_ENUM filterFs(TSK_FS_INFO * fs_info); diff --git a/tsk/auto/auto_db.cpp b/tsk/auto/auto_db.cpp index 2f3b078b84fd46b6a5ff23268e249363dc6dc043..e066654b95fe10b2e7d66cdefe1cd03d2eff58dd 100644 --- a/tsk/auto/auto_db.cpp +++ b/tsk/auto/auto_db.cpp @@ -48,6 +48,7 @@ TskAutoDb::TskAutoDb(TskDb * a_db, TSK_HDB_INFO * a_NSRLDb, TSK_HDB_INFO * a_kno m_stopped = false; m_foundStructure = false; m_imgTransactionOpen = false; + m_attributeAdded = false; m_NSRLDb = a_NSRLDb; m_knownBadDb = a_knownBadDb; if ((m_NSRLDb) || (m_knownBadDb)) { @@ -254,8 +255,7 @@ TskAutoDb::addImageDetails(const char* deviceId) // Add the image names for (int i = 0; i < m_img_info->num_img; i++) { - const char *img_ptr = NULL; - img_ptr = img_ptrs[i]; + const char *img_ptr = img_ptrs[i]; if (m_db->addImageName(m_curImgId, img_ptr, i)) { registerError(); diff --git a/tsk/fs/ext2fs.c b/tsk/fs/ext2fs.c index 1fd5e23dad8b4a64ad7a0df16aecade2247efcb5..56af8b0321952b452c9a285db68167b7e16f2529 100644 --- a/tsk/fs/ext2fs.c +++ b/tsk/fs/ext2fs.c @@ -1707,7 +1707,6 @@ ext4_fsstat_datablock_helper(TSK_FS_INFO * fs, FILE * hFile, uint64_t last_block; ext4fs_gd *ext4_gd = ext2fs->ext4_grp_buf; uint64_t db_offset = 0; - unsigned int left_over = 0; if (ext4_gd == NULL) { return; @@ -1752,6 +1751,7 @@ ext4_fsstat_datablock_helper(TSK_FS_INFO * fs, FILE * hFile, if (i % gpfbg == 0) { if (curr_flex_bg == (num_flex_bg - 1)) { unsigned int num_groups = 0; + unsigned int left_over = 0; num_groups = (unsigned int) (fs->last_block / tsk_getu32(fs->endian, diff --git a/tsk/fs/ntfs_dent.cpp b/tsk/fs/ntfs_dent.cpp index d3c07b43cc4b82cd3a2fa6fab7d43a6ca0e458e2..1be3310585a3eb7b199f64ae57a5545b258ebd15 100644 --- a/tsk/fs/ntfs_dent.cpp +++ b/tsk/fs/ntfs_dent.cpp @@ -752,7 +752,6 @@ ntfs_dir_open_meta(TSK_FS_INFO * a_fs, TSK_FS_DIR ** a_fs_dir, ntfs_idxroot *idxroot; ntfs_idxelist *idxelist; ntfs_idxrec *idxrec_p, *idxrec; - int off; TSK_OFF_T idxalloc_len; TSK_FS_LOAD_FILE load_file; @@ -996,6 +995,7 @@ ntfs_dir_open_meta(TSK_FS_INFO * a_fs, TSK_FS_DIR ** a_fs_dir, } } else { + int off; if (fs_attr_idx->flags & TSK_FS_ATTR_RES) { tsk_error_reset(); @@ -1390,7 +1390,6 @@ ntfs_find_file_rec(TSK_FS_INFO * fs, NTFS_DINFO * dinfo, uint8_t decrem = 0; size_t len = 0, i; char *begin = NULL; - int retval; if (fs_name_list->par_inode < fs->first_inum || @@ -1417,6 +1416,7 @@ ntfs_find_file_rec(TSK_FS_INFO * fs, NTFS_DINFO * dinfo, if (( ! TSK_FS_IS_DIR_META(fs_file_par->meta->type)) || (fs_file_par->meta->seq != fs_name_list->par_seq)) { const char *str = TSK_FS_ORPHAN_STR; + int retval; len = strlen(str); /* @@@ There should be a sanity check here to verify that the