From 8c402756a4e92dc44b02695f6782333a376aa7d6 Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Fri, 18 Apr 2025 15:31:48 +0900 Subject: [PATCH] Fix integer comparison of different signedness --- src/parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/parser.c b/src/parser.c index 7cc60c6..85578b6 100644 --- a/src/parser.c +++ b/src/parser.c @@ -1077,7 +1077,7 @@ SDArchiverLinkedList *simple_archiver_parsed_to_filenames( file_info->link_dest = malloc(MAX_SYMBOLIC_LINK_SIZE); ssize_t count = readlinkat(AT_FDCWD, filename, file_info->link_dest, MAX_SYMBOLIC_LINK_SIZE - 1); - if (count >= MAX_SYMBOLIC_LINK_SIZE - 1) { + if (count >= (ssize_t)MAX_SYMBOLIC_LINK_SIZE - 1) { file_info->link_dest[MAX_SYMBOLIC_LINK_SIZE - 1] = 0; } else if (count > 0) { file_info->link_dest[count] = 0; @@ -1181,7 +1181,7 @@ SDArchiverLinkedList *simple_archiver_parsed_to_filenames( ssize_t count = readlinkat(AT_FDCWD, combined_path, file_info->link_dest, MAX_SYMBOLIC_LINK_SIZE - 1); - if (count >= MAX_SYMBOLIC_LINK_SIZE - 1) { + if (count >= (ssize_t)MAX_SYMBOLIC_LINK_SIZE - 1) { file_info->link_dest[MAX_SYMBOLIC_LINK_SIZE - 1] = 0; } else if (count > 0) { file_info->link_dest[count] = 0; -- 2.49.0