-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8342868: Errors related to unused code on Windows after 8339120 in core libs #21654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -965,8 +965,9 @@ void getNumberPart(const jchar * langtag, const jint numberStyle, WCHAR * number | |
void getFixPart(const jchar * langtag, const jint numberStyle, BOOL positive, BOOL prefix, WCHAR * ret) { | ||
DWORD pattern = 0; | ||
int style = numberStyle; | ||
int got = 0; | ||
// int got = 0; | ||
|
||
/* | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't understand this one at all - what did gcc actually complain about here? This code all seems used. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The warning received is that got is set but not used - I had a look at getLocaleInfoWrapper and it seems like it has no side effects, its only purpose is to return a value, which is the variable got in this case. I'm pretty certain got not being used is a bug, and that it is needed somewhere, but someone forgot to hook it up to whatever needs it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It does seem a bug, where the return value is not handled correctly. Can you please file a separate bug? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
While Usually, based on We could just add that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, Justin. That is correct. Only |
||
if (positive) { | ||
if (style == sun_util_locale_provider_HostLocaleProviderAdapterImpl_NF_CURRENCY) { | ||
got = getLocaleInfoWrapper(langtag, | ||
|
@@ -992,6 +993,7 @@ void getFixPart(const jchar * langtag, const jint numberStyle, BOOL positive, BO | |
(LPWSTR)&pattern, sizeof(pattern)); | ||
} | ||
} | ||
*/ | ||
|
||
if (numberStyle == sun_util_locale_provider_HostLocaleProviderAdapterImpl_NF_INTEGER) { | ||
style = sun_util_locale_provider_HostLocaleProviderAdapterImpl_NF_NUMBER; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -232,7 +232,7 @@ static int getWinTimeZone(char *winZoneName, size_t winZoneNameBufSize) | |
WCHAR stdNameInReg[MAX_ZONE_CHAR]; | ||
TziValue tempTzi; | ||
WCHAR *stdNamePtr = tzi.StandardName; | ||
int onlyMapID; | ||
// int onlyMapID; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like this became unused with JDK-8209167, so deleting it seems fine to me. |
||
|
||
timeType = GetTimeZoneInformation(&tzi); | ||
if (timeType == TIME_ZONE_ID_INVALID) { | ||
|
@@ -304,7 +304,7 @@ static int getWinTimeZone(char *winZoneName, size_t winZoneNameBufSize) | |
* Compare to the "Std" value of each subkey and find the entry that | ||
* matches the current control panel setting. | ||
*/ | ||
onlyMapID = 0; | ||
// onlyMapID = 0; | ||
for (i = 0; i < nSubKeys; ++i) { | ||
DWORD size = sizeof(subKeyName); | ||
ret = RegEnumKeyEx(hKey, i, subKeyName, &size, NULL, NULL, NULL, NULL); | ||
|
@@ -325,7 +325,7 @@ static int getWinTimeZone(char *winZoneName, size_t winZoneNameBufSize) | |
* entry in the Time Zones registry. | ||
*/ | ||
RegCloseKey(hSubKey); | ||
onlyMapID = 1; | ||
// onlyMapID = 1; | ||
ret = RegOpenKeyExW(hKey, stdNamePtr, 0, KEY_READ, (PHKEY)&hSubKey); | ||
if (ret != ERROR_SUCCESS) { | ||
goto err; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,7 +47,7 @@ static jfieldID ntlm_ctxHandleID; | |
static jfieldID ntlm_crdHandleID; | ||
static jfieldID status_seqCompleteID; | ||
|
||
static HINSTANCE lib = NULL; | ||
// static HINSTANCE lib = NULL; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like this became unused with JDK-7030256, so removal seems fine. |
||
|
||
JNIEXPORT void JNICALL Java_sun_net_www_protocol_http_ntlm_NTLMAuthSequence_initFirst | ||
(JNIEnv *env, jclass authseq_clazz, jclass status_clazz) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not my area but this fix looks reasonable.