RFR: 8278021: Fix warnings in macOS glass native code and treat warnings as errors

Kevin Rushforth kcr at openjdk.org
Fri Jan 26 18:23:41 UTC 2024


On Thu, 3 Feb 2022 16:33:59 GMT, Martin Fox <mfox at openjdk.org> 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.
>
> Yes, the deprecated constants should be fixed as the code is updated. They weren't included in this PR because there's a lot of them and they're all cosmetic.

@beldenfox I let this PR drop off  my radar a while ago. Sorry about that!

I've been taking a look at our various warnings in a number of places, and was recently reminded of this by a comment you made in PR #1351 :

> I also updated a few deprecated constants so this file no longer generates compiler warnings.

Would you be willing to revive this PR, provided of course, that I actually review it this time? It will likely need to be updated in light of other changes in the past year or so.

-------------

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


More information about the openjfx-dev mailing list