You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-full-overlay/app-arch/unar/files/unar-1.10.8-Wint-conversion...

41 lines
1.8 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

Without this change, GCC 14 will fail compilation with an error:
XADRAR5Parser.m: In function +[XADRAR5Parser recognizeFileWithHandle:firstBytes:name:]: XADRAR5Parser.m:79:5: warning: XADRAR5Parser may not respond to +signatureLocationInData:
79 | off_t signatureLocation = [self signatureLocationInData:data];
| ^~~~~
XADRAR5Parser.m:79:5: warning: (messages without a matching method signature will be assumed to return id and accept ... as arguments)
XADRAR5Parser.m:79:31: error: initialization of off_t {aka long int} from id makes integer from pointer without a cast
79 | off_t signatureLocation = [self signatureLocationInData:data];
| ^
Submitted upstream: <https://github.com/MacPaw/XADMaster/pull/161>
--- a/XADRAR5Parser.m
+++ b/XADRAR5Parser.m
@@ -74,12 +74,6 @@ static inline BOOL IsZeroHeaderBlock(RAR5HeaderBlock block) { return IsZeroBlock
return 8;
}
-+(BOOL)recognizeFileWithHandle:(CSHandle *)handle firstBytes:(NSData *)data name:(NSString *)name
-{
- off_t signatureLocation = [self signatureLocationInData:data];
- return signatureLocation != RAR5SignatureNotFound;
-}
-
+ (off_t)signatureLocationInData:(NSData *)data {
const uint8_t *bytes=[data bytes];
int length=[data length];
@@ -98,6 +92,12 @@ static inline BOOL IsZeroHeaderBlock(RAR5HeaderBlock block) { return IsZeroBlock
return RAR5SignatureNotFound;
}
++(BOOL)recognizeFileWithHandle:(CSHandle *)handle firstBytes:(NSData *)data name:(NSString *)name
+{
+ off_t signatureLocation = [self signatureLocationInData:data];
+ return signatureLocation != RAR5SignatureNotFound;
+}
+
+(NSArray *)volumesForHandle:(CSHandle *)handle firstBytes:(NSData *)data name:(NSString *)name
{
// Check if multipart