Bug 232423 - [watchOS] Fix logging
Summary: [watchOS] Fix logging
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Myles C. Maxfield
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-10-27 23:20 PDT by Myles C. Maxfield
Modified: 2021-10-28 10:11 PDT (History)
8 users (show)

See Also:


Attachments
Patch (2.99 KB, patch)
2021-10-27 23:22 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Myles C. Maxfield 2021-10-27 23:20:33 PDT
[watchOS] Fix logging
Comment 1 Myles C. Maxfield 2021-10-27 23:22:48 PDT
Created attachment 442677 [details]
Patch
Comment 2 EWS 2021-10-28 09:39:00 PDT
Committed r284988 (243635@main): <https://commits.webkit.org/243635@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 442677 [details].
Comment 3 Radar WebKit Bug Importer 2021-10-28 09:39:20 PDT
<rdar://problem/84761390>
Comment 4 Alexey Proskuryakov 2021-10-28 09:46:05 PDT
Comment on attachment 442677 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=442677&action=review

> Source/WebCore/ChangeLog:10
> +        OSStatus is typedef'ed to an SInt32. On watchOS, SInt32 is typedef'ed to be a signed long.
> +        A signed long on watchOS is 4 bytes long. On non-watchOS, SInt32 is typedef'ed to be a signed int.
> +        So, if we want to use printf formatting strings, we have to cast the OSStatus to an int.

It sounds like it would be nicer to cast it to signed long instead, given this explanation.
Comment 5 Myles C. Maxfield 2021-10-28 10:11:28 PDT
Comment on attachment 442677 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=442677&action=review

>> Source/WebCore/ChangeLog:10
>> +        So, if we want to use printf formatting strings, we have to cast the OSStatus to an int.
> 
> It sounds like it would be nicer to cast it to signed long instead, given this explanation.

Really? OSStatus ends up being 4 bytes on every platform, and int is also 4 bytes on every platform - so I thought it would be a perfect fit. Why is long better?