I've been trying to get the JDK to compile with the new /permissive- switch in
VS2017 (https://devblogs.microsoft.com/cppblog/permissive-switch/) however
there have been a few issues in various parts of the code. There are a few
issues in the libjsound code where we attempt to assign string literals to
LPSTR variables (instead of LPCSTR). I took some time to fix some of these and
attached a patch. Let me know if you have any comments/feedback. I'm assuming
that libjsound is owned by sound-dev, but if I'm mistaken, please do let me
know the right team/mailing list to send this to.
c:/Users/Andrew/Documents/mercurial/openjdk/jdk/src/java.desktop/windows/native/libjsound/PLATFORM_API_WinOS_DirectSound.cpp(363):
error C2440: 'return': cannot convert from 'const char [16]' to 'LPSTR'
Thanks,
-Andrew
ÿþd i f f - - g i t
a / s r c / j a v a . d e s k t o p / w i n d o w s / n a t i v e / l i b j s o u n d / P L A T F O R M _ A P I _ W i n O S _ D i r e c t S o u n d . c p p
b / s r c / j a v a . d e s k t o p / w i n d o w s / n a t i v e / l i b j s o u n d / P L A T F O R M _ A P I _ W i n O S _ D i r e c t S o u n d . c p p
- - -
a / s r c / j a v a . d e s k t o p / w i n d o w s / n a t i v e / l i b j s o u n d / P L A T F O R M _ A P I _ W i n O S _ D i r e c t S o u n d . c p p
+ + +
b / s r c / j a v a . d e s k t o p / w i n d o w s / n a t i v e / l i b j s o u n d / P L A T F O R M _ A P I _ W i n O S _ D i r e c t S o u n d . c p p
@ @ - 3 5 7 , 7 + 3 5 7 , 7 @ @
} D S _ I n f o ;
- L P S T R T r a n s l a t e D S E r r o r ( H R E S U L T h r ) {
+ L P C S T R T r a n s l a t e D S E r r o r ( H R E S U L T h r ) {
s w i t c h ( h r ) {
c a s e D S E R R _ A L L O C A T E D :
r e t u r n "