Re: [OpenJDK 2D-Dev] RFR: 8074844 : Resolve disabled warnings for libfontmanager

2020-08-28 Thread Sergey Bylokhov

On 27.08.2020 12:55, Philip Race wrote:

SAP or IBM can look at it if they want as a separate fix.


ok, +1




-phil.

On 8/27/20, 12:45 PM, Sergey Bylokhov wrote:

Hi, Phil.

Probably we could enable WARNINGS_AS_ERRORS_xlc as well? I guess we will need a 
confirmation from the SAP gurus.

On 27.08.2020 12:39, Philip Race wrote:

Bug : https://bugs.openjdk.java.net/browse/JDK-8074844
Webrev : http://cr.openjdk.java.net/~prr/8074844/index.html

This resolves the disabled compiler warnings in what is now quite a small 
fontmanager library.

I've built windows, mac and linux in our build system and run our full battery 
of automated tests and sanity checked manual.

A quick run down of how the warnings map to the changes

   DISABLED_WARNINGS_clang := sign-compare,

   DISABLED_WARNINGS_gcc := sign-compare unused-function 
int-to-pointer-cast,

Sign compare in both of the above are the reason for the majority of the 
changes in freetypeScaler.c
and also the change in hb-jdk.h


unused-function was _free_nothing in
src/java.desktop/share/native/libfontmanager/hb-jdk-font.cc


int-to-pointer-cast was an issue for 32 bit as raised here 
https://bugs.openjdk.java.net/browse/JDK-8250605
when a previous removal broke 32 bit Linux. Since we don't build or test that I 
was flying in the dark here
using the warnings from that bug. The changes for this are those in

src/java.desktop/share/native/libfontmanager/DrawGlyphList.c
src/java.desktop/unix/native/libfontmanager/X11FontScaler.c


   DISABLED_WARNINGS_microsoft := 4018 4146 4244 4996,

The unique windows warnings were
./open/src/java.desktop/share/native/libfontmanager/HBShaper.c(216): error 
C2220: the following warning is treated as an error
  ./open/src/java.desktop/share/native/libfontmanager/HBShaper.c(216): warning 
C4244: '=': conversion from 'jlong' to 'long', possible loss of data

  ./open/src/java.desktop/share/native/libfontmanager/freetypeScaler.c(1216): 
error C2220: the following warning is treated as an error
  ./open/src/java.desktop/share/native/libfontmanager/freetypeScaler.c(1216): 
warning C4146: unary minus operator applied to unsigned type, result still 
unsigned

./open/src/java.desktop/windows/native/libfontmanager/lcdglyph.c(128): error 
C2220: the following warning is treated as an error
[ ./open/src/java.desktop/windows/native/libfontmanager/lcdglyph.c(128): 
warning C4996: 'GetVersion': was declared deprecated

GetVersion isn't needed any more since we aren't likely to be running on 
anything older than XP !

-phil.










--
Best regards, Sergey.


Re: [OpenJDK 2D-Dev] RFR: 8074844 : Resolve disabled warnings for libfontmanager

2020-08-28 Thread Magnus Ihse Bursie



On 2020-08-27 21:39, Philip Race wrote:

Bug : https://bugs.openjdk.java.net/browse/JDK-8074844
Webrev : http://cr.openjdk.java.net/~prr/8074844/index.html

Looks good to me.

Thank you Phil for cleaning this up!

/Magnus



This resolves the disabled compiler warnings in what is now quite a 
small fontmanager library.


I've built windows, mac and linux in our build system and run our full 
battery of automated tests and sanity checked manual.


A quick run down of how the warnings map to the changes

  DISABLED_WARNINGS_clang := sign-compare,

  DISABLED_WARNINGS_gcc := sign-compare unused-function 
int-to-pointer-cast,


Sign compare in both of the above are the reason for the majority of 
the changes in freetypeScaler.c

and also the change in hb-jdk.h


unused-function was _free_nothing in
src/java.desktop/share/native/libfontmanager/hb-jdk-font.cc


int-to-pointer-cast was an issue for 32 bit as raised here 
https://bugs.openjdk.java.net/browse/JDK-8250605
when a previous removal broke 32 bit Linux. Since we don't build or 
test that I was flying in the dark here

using the warnings from that bug. The changes for this are those in

src/java.desktop/share/native/libfontmanager/DrawGlyphList.c
src/java.desktop/unix/native/libfontmanager/X11FontScaler.c


  DISABLED_WARNINGS_microsoft := 4018 4146 4244 4996,

The unique windows warnings were
./open/src/java.desktop/share/native/libfontmanager/HBShaper.c(216): 
error C2220: the following warning is treated as an error
 ./open/src/java.desktop/share/native/libfontmanager/HBShaper.c(216): 
warning C4244: '=': conversion from 'jlong' to 'long', possible loss 
of data


 ./open/src/java.desktop/share/native/libfontmanager/freetypeScaler.c(1216): 
error C2220: the following warning is treated as an error
 ./open/src/java.desktop/share/native/libfontmanager/freetypeScaler.c(1216): 
warning C4146: unary minus operator applied to unsigned type, result 
still unsigned


./open/src/java.desktop/windows/native/libfontmanager/lcdglyph.c(128): 
error C2220: the following warning is treated as an error
[ 
./open/src/java.desktop/windows/native/libfontmanager/lcdglyph.c(128): 
warning C4996: 'GetVersion': was declared deprecated


GetVersion isn't needed any more since we aren't likely to be running 
on anything older than XP !


-phil.








Re: [OpenJDK 2D-Dev] RFR: 8074844 : Resolve disabled warnings for libfontmanager

2020-08-27 Thread Erik Joelsson

Build change looks good.

/Erik

On 2020-08-27 12:39, Philip Race wrote:

Bug : https://bugs.openjdk.java.net/browse/JDK-8074844
Webrev : http://cr.openjdk.java.net/~prr/8074844/index.html

This resolves the disabled compiler warnings in what is now quite a 
small fontmanager library.


I've built windows, mac and linux in our build system and run our full 
battery of automated tests and sanity checked manual.


A quick run down of how the warnings map to the changes

  DISABLED_WARNINGS_clang := sign-compare,

  DISABLED_WARNINGS_gcc := sign-compare unused-function 
int-to-pointer-cast,


Sign compare in both of the above are the reason for the majority of 
the changes in freetypeScaler.c

and also the change in hb-jdk.h


unused-function was _free_nothing in
src/java.desktop/share/native/libfontmanager/hb-jdk-font.cc


int-to-pointer-cast was an issue for 32 bit as raised here 
https://bugs.openjdk.java.net/browse/JDK-8250605
when a previous removal broke 32 bit Linux. Since we don't build or 
test that I was flying in the dark here

using the warnings from that bug. The changes for this are those in

src/java.desktop/share/native/libfontmanager/DrawGlyphList.c
src/java.desktop/unix/native/libfontmanager/X11FontScaler.c


  DISABLED_WARNINGS_microsoft := 4018 4146 4244 4996,

The unique windows warnings were
./open/src/java.desktop/share/native/libfontmanager/HBShaper.c(216): 
error C2220: the following warning is treated as an error
 ./open/src/java.desktop/share/native/libfontmanager/HBShaper.c(216): 
warning C4244: '=': conversion from 'jlong' to 'long', possible loss 
of data


 ./open/src/java.desktop/share/native/libfontmanager/freetypeScaler.c(1216): 
error C2220: the following warning is treated as an error
 ./open/src/java.desktop/share/native/libfontmanager/freetypeScaler.c(1216): 
warning C4146: unary minus operator applied to unsigned type, result 
still unsigned


./open/src/java.desktop/windows/native/libfontmanager/lcdglyph.c(128): 
error C2220: the following warning is treated as an error
[ 
./open/src/java.desktop/windows/native/libfontmanager/lcdglyph.c(128): 
warning C4996: 'GetVersion': was declared deprecated


GetVersion isn't needed any more since we aren't likely to be running 
on anything older than XP !


-phil.






Re: [OpenJDK 2D-Dev] RFR: 8074844 : Resolve disabled warnings for libfontmanager

2020-08-27 Thread Philip Race
I left that alone on purpose. I have no way of testing it and whereas 
for the 32 bit
linux case I had an idea of what to fix, for xlc all I could find was it 
came in with
https://bugs.openjdk.java.net/browse/JDK-8154087 and I've no idea what 
the problems were.


SAP or IBM can look at it if they want as a separate fix.

-phil.

On 8/27/20, 12:45 PM, Sergey Bylokhov wrote:

Hi, Phil.

Probably we could enable WARNINGS_AS_ERRORS_xlc as well? I guess we 
will need a confirmation from the SAP gurus.


On 27.08.2020 12:39, Philip Race wrote:

Bug : https://bugs.openjdk.java.net/browse/JDK-8074844
Webrev : http://cr.openjdk.java.net/~prr/8074844/index.html

This resolves the disabled compiler warnings in what is now quite a 
small fontmanager library.


I've built windows, mac and linux in our build system and run our 
full battery of automated tests and sanity checked manual.


A quick run down of how the warnings map to the changes

   DISABLED_WARNINGS_clang := sign-compare,

   DISABLED_WARNINGS_gcc := sign-compare unused-function 
int-to-pointer-cast,


Sign compare in both of the above are the reason for the majority of 
the changes in freetypeScaler.c

and also the change in hb-jdk.h


unused-function was _free_nothing in
src/java.desktop/share/native/libfontmanager/hb-jdk-font.cc


int-to-pointer-cast was an issue for 32 bit as raised here 
https://bugs.openjdk.java.net/browse/JDK-8250605
when a previous removal broke 32 bit Linux. Since we don't build or 
test that I was flying in the dark here

using the warnings from that bug. The changes for this are those in

src/java.desktop/share/native/libfontmanager/DrawGlyphList.c
src/java.desktop/unix/native/libfontmanager/X11FontScaler.c


   DISABLED_WARNINGS_microsoft := 4018 4146 4244 4996,

The unique windows warnings were
./open/src/java.desktop/share/native/libfontmanager/HBShaper.c(216): 
error C2220: the following warning is treated as an error
  ./open/src/java.desktop/share/native/libfontmanager/HBShaper.c(216): warning 
C4244: '=': conversion from 'jlong' to 'long', possible loss of data


  ./open/src/java.desktop/share/native/libfontmanager/freetypeScaler.c(1216): 
error C2220: the following warning is treated as an error
  ./open/src/java.desktop/share/native/libfontmanager/freetypeScaler.c(1216): 
warning C4146: unary minus operator applied to unsigned type, result 
still unsigned


./open/src/java.desktop/windows/native/libfontmanager/lcdglyph.c(128): error 
C2220: the following warning is treated as an error
[ 
./open/src/java.desktop/windows/native/libfontmanager/lcdglyph.c(128): warning 
C4996: 'GetVersion': was declared deprecated


GetVersion isn't needed any more since we aren't likely to be running 
on anything older than XP !


-phil.









Re: [OpenJDK 2D-Dev] RFR: 8074844 : Resolve disabled warnings for libfontmanager

2020-08-27 Thread Sergey Bylokhov

Hi, Phil.

Probably we could enable WARNINGS_AS_ERRORS_xlc as well? I guess we will need a 
confirmation from the SAP gurus.

On 27.08.2020 12:39, Philip Race wrote:

Bug : https://bugs.openjdk.java.net/browse/JDK-8074844
Webrev : http://cr.openjdk.java.net/~prr/8074844/index.html

This resolves the disabled compiler warnings in what is now quite a small 
fontmanager library.

I've built windows, mac and linux in our build system and run our full battery 
of automated tests and sanity checked manual.

A quick run down of how the warnings map to the changes

   DISABLED_WARNINGS_clang := sign-compare,

   DISABLED_WARNINGS_gcc := sign-compare unused-function 
int-to-pointer-cast,

Sign compare in both of the above are the reason for the majority of the 
changes in freetypeScaler.c
and also the change in hb-jdk.h


unused-function was _free_nothing in
src/java.desktop/share/native/libfontmanager/hb-jdk-font.cc


int-to-pointer-cast was an issue for 32 bit as raised here 
https://bugs.openjdk.java.net/browse/JDK-8250605
when a previous removal broke 32 bit Linux. Since we don't build or test that I 
was flying in the dark here
using the warnings from that bug. The changes for this are those in

src/java.desktop/share/native/libfontmanager/DrawGlyphList.c
src/java.desktop/unix/native/libfontmanager/X11FontScaler.c


   DISABLED_WARNINGS_microsoft := 4018 4146 4244 4996,

The unique windows warnings were
./open/src/java.desktop/share/native/libfontmanager/HBShaper.c(216): error 
C2220: the following warning is treated as an error
  ./open/src/java.desktop/share/native/libfontmanager/HBShaper.c(216): warning 
C4244: '=': conversion from 'jlong' to 'long', possible loss of data

  ./open/src/java.desktop/share/native/libfontmanager/freetypeScaler.c(1216): 
error C2220: the following warning is treated as an error
  ./open/src/java.desktop/share/native/libfontmanager/freetypeScaler.c(1216): 
warning C4146: unary minus operator applied to unsigned type, result still 
unsigned

./open/src/java.desktop/windows/native/libfontmanager/lcdglyph.c(128): error 
C2220: the following warning is treated as an error
[ ./open/src/java.desktop/windows/native/libfontmanager/lcdglyph.c(128): 
warning C4996: 'GetVersion': was declared deprecated

GetVersion isn't needed any more since we aren't likely to be running on 
anything older than XP !

-phil.







--
Best regards, Sergey.


[OpenJDK 2D-Dev] RFR: 8074844 : Resolve disabled warnings for libfontmanager

2020-08-27 Thread Philip Race

Bug : https://bugs.openjdk.java.net/browse/JDK-8074844
Webrev : http://cr.openjdk.java.net/~prr/8074844/index.html

This resolves the disabled compiler warnings in what is now quite a 
small fontmanager library.


I've built windows, mac and linux in our build system and run our full 
battery of automated tests and sanity checked manual.


A quick run down of how the warnings map to the changes

  DISABLED_WARNINGS_clang := sign-compare,

  DISABLED_WARNINGS_gcc := sign-compare unused-function int-to-pointer-cast,

Sign compare in both of the above are the reason for the majority of the 
changes in freetypeScaler.c
and also the change in hb-jdk.h


unused-function was _free_nothing in
src/java.desktop/share/native/libfontmanager/hb-jdk-font.cc


int-to-pointer-cast was an issue for 32 bit as raised here 
https://bugs.openjdk.java.net/browse/JDK-8250605
when a previous removal broke 32 bit Linux. Since we don't build or test that I 
was flying in the dark here
using the warnings from that bug. The changes for this are those in

src/java.desktop/share/native/libfontmanager/DrawGlyphList.c
src/java.desktop/unix/native/libfontmanager/X11FontScaler.c


  DISABLED_WARNINGS_microsoft := 4018 4146 4244 4996,

The unique windows warnings were
./open/src/java.desktop/share/native/libfontmanager/HBShaper.c(216): error 
C2220: the following warning is treated as an error
 ./open/src/java.desktop/share/native/libfontmanager/HBShaper.c(216): warning 
C4244: '=': conversion from 'jlong' to 'long', possible loss of data

 ./open/src/java.desktop/share/native/libfontmanager/freetypeScaler.c(1216): 
error C2220: the following warning is treated as an error
 ./open/src/java.desktop/share/native/libfontmanager/freetypeScaler.c(1216): 
warning C4146: unary minus operator applied to unsigned type, result still 
unsigned

./open/src/java.desktop/windows/native/libfontmanager/lcdglyph.c(128): error 
C2220: the following warning is treated as an error
[ ./open/src/java.desktop/windows/native/libfontmanager/lcdglyph.c(128): 
warning C4996: 'GetVersion': was declared deprecated

GetVersion isn't needed any more since we aren't likely to be running on 
anything older than XP !

-phil.