This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
commit cacbca22625a9a8f3aa38cde8582011a02dcfeef Author: cuiziwei <[email protected]> AuthorDate: Thu May 28 15:55:36 2026 +0800 libarchive: fix signed/unsigned comparison warning in preprocessor Newer Clang versions emit -Werror on the INT_MIN <= O_NOFOLLOW comparison because INT_MIN (negative) gets implicitly converted to unsigned. Simplify the check to O_NOFOLLOW > INT_MAX which is logically equivalent and avoids the diagnostic. Signed-off-by: cuiziwei <[email protected]> Signed-off-by: tengshuangshuang <[email protected]> --- ...signed-unsigned-comparison-warning-in-preprocessor.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/system/libarchive/0013-fix-signed-unsigned-comparison-warning-in-preprocessor.patch b/system/libarchive/0013-fix-signed-unsigned-comparison-warning-in-preprocessor.patch new file mode 100644 index 000000000..39242234d --- /dev/null +++ b/system/libarchive/0013-fix-signed-unsigned-comparison-warning-in-preprocessor.patch @@ -0,0 +1,13 @@ +diff --git a/libarchive/archive_write_disk_posix.c b/libarchive/archive_write_disk_posix.c +index d9619fe2..e76a608d 100644 +--- a/libarchive/archive_write_disk_posix.c ++++ b/libarchive/archive_write_disk_posix.c +@@ -156,7 +156,7 @@ + + /* Ignore non-int O_NOFOLLOW constant. */ + /* gnulib's fcntl.h does this on AIX, but it seems practical everywhere */ +-#if defined O_NOFOLLOW && !(INT_MIN <= O_NOFOLLOW && O_NOFOLLOW <= INT_MAX) ++#if defined O_NOFOLLOW && O_NOFOLLOW > INT_MAX + #undef O_NOFOLLOW + #endif +
