Details
-
Enhancement
-
Resolution: Fixed
-
P4
-
22
-
b12
Description
After JDK-8314114, SonarCloud reports the use on uninitialized `sig` variable in the `warning` line here:
int SR_initialize() {
...
int sig;
bool result = parse_integer(s, &sig);
if (result && sig > MAX2(SIGSEGV, SIGBUS) && // See 4355769.
sig < NSIG) { // Must be legal signal and fit into sigflags[].
PosixSignals::SR_signum = sig;
} else {
warning("You set _JAVA_SR_SIGNUM=%d. It must be in range [%d, %d]. Using %d instead.",
sig, MAX2(SIGSEGV, SIGBUS)+1, NSIG-1, PosixSignals::SR_signum);
}
int SR_initialize() {
...
int sig;
bool result = parse_integer(s, &sig);
if (result && sig > MAX2(SIGSEGV, SIGBUS) && // See 4355769.
sig < NSIG) { // Must be legal signal and fit into sigflags[].
PosixSignals::SR_signum = sig;
} else {
warning("You set _JAVA_SR_SIGNUM=%d. It must be in range [%d, %d]. Using %d instead.",
sig, MAX2(SIGSEGV, SIGBUS)+1, NSIG-1, PosixSignals::SR_signum);
}
Attachments
Issue Links
- relates to
-
JDK-8314114 Fix -Wconversion warnings in os code, primarily linux
- Resolved