Re: RFR: 8278021: Fix warnings in macOS glass native code and treat warnings as errors [v3]

2024-02-02 Thread Martin Fox
On Fri, 2 Feb 2024 15:40:35 GMT, Martin Fox  wrote:

>> Turning on warnings-as-errors for the macOS glass native code. Deprecated 
>> declarations are excluded and still appear as warnings.
>> 
>> In the code that tries to locate the application's dock icon there were 
>> three instances where `NO` was being passed into a method that required a 
>> pointer to a `BOOL`, not a `BOOL`. I suspect the intent was to check that 
>> the path pointed to an existing file but not a directory. Since JavaFX has 
>> gone this long without screening out directories correctly I decided not to 
>> fix that behavior except at the very end.
>> 
>> The only other changes of note are sending some NSNotification objects to 
>> delegate API's that require them even though we know they're ignored on the 
>> other side. It was the easiest way to get rid of the warning.
>
> Martin Fox has updated the pull request with a new target base due to a merge 
> or a rebase. The pull request now contains 13 commits:
> 
>  - Fixed ambiguous comment
>  - Merge remote-tracking branch 'upstream/master' into macerrors
>  - Merge remote-tracking branch 'upstream/master' into macerrors
>  - Remove reference to non-existent generic Java app icon
>  - Fixed umatched pragma push
>  - Remove unnecessary comment
>  - Simpler handling of temporary NSNotification
>  - Fixed leaked object. Removed unnecessary pragma.
>  - Consistency in dealing with path to app icon. Updated default image name.
>  - Turning off deprecation warnings on a per-file basis. Fixes for some 
> warnings.
>  - ... and 3 more: https://git.openjdk.org/jfx/compare/12816b57...1c4c4e96

The pre-submit error is due to a call to `[NSApp activate]` which is only 
available in macOS 14.0 and up. My local builds use a 14.x SDK but the 
pre-submit tests are built with 13.3. It's an easy fix but I first need to find 
out why the SDK matters; the minimum target is 11.0 so I should have seen a 
warning.

-

PR Comment: https://git.openjdk.org/jfx/pull/687#issuecomment-1924201479


Re: RFR: 8278021: Fix warnings in macOS glass native code and treat warnings as errors [v3]

2024-02-02 Thread Martin Fox
On Fri, 2 Feb 2024 15:40:35 GMT, Martin Fox  wrote:

>> Turning on warnings-as-errors for the macOS glass native code. Deprecated 
>> declarations are excluded and still appear as warnings.
>> 
>> In the code that tries to locate the application's dock icon there were 
>> three instances where `NO` was being passed into a method that required a 
>> pointer to a `BOOL`, not a `BOOL`. I suspect the intent was to check that 
>> the path pointed to an existing file but not a directory. Since JavaFX has 
>> gone this long without screening out directories correctly I decided not to 
>> fix that behavior except at the very end.
>> 
>> The only other changes of note are sending some NSNotification objects to 
>> delegate API's that require them even though we know they're ignored on the 
>> other side. It was the easiest way to get rid of the warning.
>
> Martin Fox has updated the pull request with a new target base due to a merge 
> or a rebase. The pull request now contains 13 commits:
> 
>  - Fixed ambiguous comment
>  - Merge remote-tracking branch 'upstream/master' into macerrors
>  - Merge remote-tracking branch 'upstream/master' into macerrors
>  - Remove reference to non-existent generic Java app icon
>  - Fixed umatched pragma push
>  - Remove unnecessary comment
>  - Simpler handling of temporary NSNotification
>  - Fixed leaked object. Removed unnecessary pragma.
>  - Consistency in dealing with path to app icon. Updated default image name.
>  - Turning off deprecation warnings on a per-file basis. Fixes for some 
> warnings.
>  - ... and 3 more: https://git.openjdk.org/jfx/compare/12816b57...1c4c4e96

Re-opening this PR. Instead of disabling deprecation warnings globally I added 
pragmas to the relevant files. This will make it easier to continue the 
clean-up; someone can file a bug against a specific file, remove the pragma, 
and fix it up without having to wade through the warnings generated by the 
other files.

-

PR Comment: https://git.openjdk.org/jfx/pull/687#issuecomment-1924185627


Re: RFR: 8278021: Fix warnings in macOS glass native code and treat warnings as errors [v3]

2024-02-02 Thread Martin Fox
> Turning on warnings-as-errors for the macOS glass native code. Deprecated 
> declarations are excluded and still appear as warnings.
> 
> In the code that tries to locate the application's dock icon there were three 
> instances where `NO` was being passed into a method that required a pointer 
> to a `BOOL`, not a `BOOL`. I suspect the intent was to check that the path 
> pointed to an existing file but not a directory. Since JavaFX has gone this 
> long without screening out directories correctly I decided not to fix that 
> behavior except at the very end.
> 
> The only other changes of note are sending some NSNotification objects to 
> delegate API's that require them even though we know they're ignored on the 
> other side. It was the easiest way to get rid of the warning.

Martin Fox has updated the pull request with a new target base due to a merge 
or a rebase. The pull request now contains 13 commits:

 - Fixed ambiguous comment
 - Merge remote-tracking branch 'upstream/master' into macerrors
 - Merge remote-tracking branch 'upstream/master' into macerrors
 - Remove reference to non-existent generic Java app icon
 - Fixed umatched pragma push
 - Remove unnecessary comment
 - Simpler handling of temporary NSNotification
 - Fixed leaked object. Removed unnecessary pragma.
 - Consistency in dealing with path to app icon. Updated default image name.
 - Turning off deprecation warnings on a per-file basis. Fixes for some 
warnings.
 - ... and 3 more: https://git.openjdk.org/jfx/compare/12816b57...1c4c4e96

-

Changes: https://git.openjdk.org/jfx/pull/687/files
 Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=687&range=02
  Stats: 51 lines in 17 files changed: 33 ins; 5 del; 13 mod
  Patch: https://git.openjdk.org/jfx/pull/687.diff
  Fetch: git fetch https://git.openjdk.org/jfx.git pull/687/head:pull/687

PR: https://git.openjdk.org/jfx/pull/687