From d5338dbef0f2f02b503720db408384b21ab8583c Mon Sep 17 00:00:00 2001
From: "Rob Swindell (on Debian Linux)" <rob@synchro.net>
Date: Tue, 28 Mar 2023 15:22:48 -0700
Subject: [PATCH] Fix clang warning: implicit conversion from 'long' to
 'double'

changes value from 9223372036854775807 to 9223372036854775808
[-Wimplicit-const-int-float-conversion]
        if(bytes < 0 || bytes > INT64_MAX)
                              ~ ^~~~~~~~~
/usr/include/x86/_stdint.h:90:19: note: expanded from macro 'INT64_MAX'
 #define INT64_MAX       0x7fffffffffffffff
                         ^~~~~~~~~~~~~~~~~~
---
 src/xpdev/genwrap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/xpdev/genwrap.c b/src/xpdev/genwrap.c
index aa7d63b8e7..768d7a1830 100644
--- a/src/xpdev/genwrap.c
+++ b/src/xpdev/genwrap.c
@@ -281,7 +281,7 @@ int64_t parse_byte_count(const char* str, ulong unit)
 	}
 	if(unit > 1)
 		bytes /= unit;
-	if(bytes < 0 || bytes > INT64_MAX)
+	if(bytes < 0 || bytes > (double)INT64_MAX)
 		return INT64_MAX;
 	return (int64_t)bytes;
 }
-- 
GitLab