RFR: 8313882: Fix -Wconversion warnings in runtime code [v7]
    Coleen Phillimore 
    coleenp at openjdk.org
       
    Wed Aug  9 20:45:00 UTC 2023
    
    
  
> Here are fixes to silence -Wconversion warnings in runtime code.  Use direct cast for 64 bit int to double, otherwise default to checked_cast<>.  I changed the declaration of _held_monitor_count and _jni_monitor count to intx to fix cascade of warnings coming from this.
> 
> src/hotspot/share/runtime/synchronizer.cpp:1802:41: warning: conversion from 'intx' {aka 'long int'} to 'int' may change value [-Wconversion]
>  1802 |     _thread->dec_held_monitor_count(rec + 1);
>       |                                     ~~~~^~~
> 
> Tested with tier1-4 on linux-x64-debug and windows-x64-debug and tier1 on Oracle supported platforms.
Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
  Put arguments back to the tested version.
-------------
Changes:
  - all: https://git.openjdk.org/jdk/pull/15177/files
  - new: https://git.openjdk.org/jdk/pull/15177/files/17eaec50..e254b2df
Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=15177&range=06
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15177&range=05-06
  Stats: 5 lines in 1 file changed: 0 ins; 0 del; 5 mod
  Patch: https://git.openjdk.org/jdk/pull/15177.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/15177/head:pull/15177
PR: https://git.openjdk.org/jdk/pull/15177
    
    
More information about the hotspot-dev
mailing list