@@ -450,6 +450,10 @@ TskAutoDbJava::addFsInfo(const TSK_FS_INFO* fs_info, int64_t parObjId,
450450* @param dataSourceObjId Object ID of the data source
451451* @returns TSK_ERR on error, TSK_OK on success
452452*/
453+
454+ #pragma GCC diagnostic push
455+ #pragma GCC diagnostic ignored "-Wunused-parameter"
456+
453457TSK_RETVAL_ENUM
454458TskAutoDbJava::addFsFile (TSK_FS_FILE* fs_file,
455459 const TSK_FS_ATTR* fs_attr, const char * path,
@@ -472,6 +476,7 @@ TskAutoDbJava::addFsFile(TSK_FS_FILE* fs_file,
472476 // Add the file to the database
473477 return addFile (fs_file, fs_attr, path, fsObjId, parObjId, dataSourceObjId);
474478}
479+ #pragma GCC diagnostic pop
475480
476481/* *
477482* Extract the extension from the given file name and store it in the supplied string.
@@ -673,15 +678,15 @@ TskAutoDbJava::addFile(TSK_FS_FILE* fs_file,
673678
674679 char *sid_str = NULL ;
675680 jstring sidj = NULL ; // return null across JNI if sid is not available
676-
681+
677682 if (tsk_fs_file_get_owner_sid (fs_file, &sid_str) == 0 ) {
678683 if (createJString (sid_str, sidj) != TSK_OK) {
679684 free (sid_str);
680685 return TSK_ERR;
681686 }
682- free (sid_str);
687+ free (sid_str);
683688 }
684-
689+
685690 // Add the file to the database
686691 jlong ret_val = m_jniEnv->CallLongMethod (m_javaDbObj, m_addFileMethodID,
687692 parObjId, fsObjId,
@@ -713,9 +718,9 @@ TskAutoDbJava::addFile(TSK_FS_FILE* fs_file,
713718 && (!(fs_file->meta ->flags & TSK_FS_META_FLAG_COMP))
714719 && (fs_attr->flags & TSK_FS_ATTR_NONRES)
715720 && (fs_attr->nrd .allocsize > fs_attr->nrd .initsize )) {
716- strncat (name, " -slack" , 6 );
721+ strcat (name, " -slack" );
717722 if (strlen (extension) > 0 ) {
718- strncat (extension, " -slack" , 6 );
723+ strcat (extension, " -slack" );
719724 }
720725 jstring slackNamej;
721726 if (createJString (name, slackNamej) != TSK_OK) {
@@ -926,6 +931,10 @@ TskAutoDbJava::addUnusedBlockFile(const int64_t parentObjId, const int64_t fsObj
926931* @param objId Object ID of the created virtual dir
927932* @param dataSourceObjId Object ID of the data source
928933*/
934+ #pragma GCC diagnostic push
935+ #pragma GCC diagnostic ignored "-Wunused-parameter"
936+
937+
929938TSK_RETVAL_ENUM
930939TskAutoDbJava::addUnallocFsBlockFilesParent (const int64_t fsObjId, int64_t & objId,
931940 int64_t dataSourceObjId) {
@@ -942,6 +951,8 @@ TskAutoDbJava::addUnallocFsBlockFilesParent(const int64_t fsObjId, int64_t& objI
942951 }
943952 return TSK_OK;
944953}
954+ #pragma GCC diagnostic pop
955+
945956
946957/* *
947958* Adds a new volume that will hold the unallocated blocks for the pool.
0 commit comments