[Commits] [SCM] claws branch, master, updated. 4.3.0-13-g9cbc6408f

miras at claws-mail.org miras at claws-mail.org
Sun Jun 30 13:52:10 UTC 2024


The branch, master has been updated
       via  9cbc6408f2b637414f6bef88fa674ce3f86f6c8c (commit)
       via  d04e9edf251b5e2f8c01bd40d7b4899b42cc5df5 (commit)
      from  71299146aaff15e6f43ae065c6e1ed5a96cc96e3 (commit)

Summary of changes:
 src/plugins/archive/libarchive_archive.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)


- Log -----------------------------------------------------------------
commit 9cbc6408f2b637414f6bef88fa674ce3f86f6c8c
Merge: d04e9edf2 71299146a
Author: Michael Rasmussen <mir at datanom.net>
Date:   Sun Jun 30 15:51:12 2024 +0200

    Merge remote-tracking branch 'refs/remotes/origin/master'


commit d04e9edf251b5e2f8c01bd40d7b4899b42cc5df5
Author: Michael Rasmussen <mir at datanom.net>
Date:   Sun Jun 30 15:48:41 2024 +0200

    Fix possible bugs - shows as warnings
    
    Signed-off-by: Michael Rasmussen <mir at datanom.net>

diff --git a/src/plugins/archive/libarchive_archive.c b/src/plugins/archive/libarchive_archive.c
index 75634f2d7..65619aed0 100644
--- a/src/plugins/archive/libarchive_archive.c
+++ b/src/plugins/archive/libarchive_archive.c
@@ -383,7 +383,6 @@ const gchar* archive_extract(const char* archive_name, int flags) {
 	struct archive* out;
 	struct archive_entry* entry;
 	int res = ARCHIVE_OK;
-	gchar* buf = NULL;
 	const char* result = NULL;
 
 	g_return_val_if_fail(archive_name != NULL, NULL);
@@ -427,7 +426,7 @@ const gchar* archive_extract(const char* archive_name, int flags) {
 					if (res == ARCHIVE_EOF)
 						res = ARCHIVE_OK;
 					if (res != ARCHIVE_OK) {
-						gchar *e = archive_error_string(in);
+						const gchar *e = archive_error_string(in);
 						g_warning("%s: %s", archive_name, e? e: "unknown error");
 						result = e;
 					}
@@ -594,7 +593,6 @@ const gchar* archive_create(const char* archive_name, GSList* files,
 			GError* err = NULL;
 			GStatBuf st;
 			int fd;
-			gchar* msg = NULL;
 
 #ifndef DEBUG_ARCHIVE
 			debug_print("Adding: %s\n", filename);
@@ -715,7 +713,7 @@ int main(int argc, char** argv) {
 	gchar cwd[PATH_MAX];
 	gboolean remove = FALSE;
 	const char *p = NULL;
-	int res;
+	const gchar* res;
 
 	getcwd(cwd, PATH_MAX);
 
@@ -749,8 +747,8 @@ int main(int argc, char** argv) {
 	while (*argv) {
 		archive_scan_folder(*argv++);
 		res = archive_create(archive, file_list, GZIP, TAR);
-		if (res != ARCHIVE_OK) {
-			fprintf(stderr, "%s: Creating archive failed\n", archive);
+		if (res != NULL) {
+			fprintf(stderr, "%s: Creating archive failed [%s]\n", archive, res);
 			return EXIT_FAILURE;
 		}
 	}
@@ -770,7 +768,8 @@ int main(int argc, char** argv) {
 		fprintf(stdout, "Executing: %s\n", buf);
 		system(buf);
 	}
-	archive_free_list(file_list);
+	if (file_list != NULL)
+		g_slist_free(file_list);
 	return EXIT_SUCCESS;
 }
 #endif

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list