Skip to content

Commit 95ca920

Browse files
committed
Style again.
1 parent ba18a9f commit 95ca920

File tree

1 file changed

+38
-38
lines changed

1 file changed

+38
-38
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/MathModuleBuiltins.java

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public abstract static class MathDoubleUnaryBuiltinNode extends MathUnaryBuiltin
106106

107107
public abstract double executeObject(Object value);
108108

109-
public double count(double value) {
109+
public double count(@SuppressWarnings("unused") double value) {
110110
throw raise(NotImplementedError, "count function in Math");
111111
}
112112

@@ -358,12 +358,12 @@ private BigInteger factorialPart(long start, long n) {
358358
}
359359

360360
@Specialization
361-
public int factorialBoolean(boolean value) {
361+
public int factorialBoolean(@SuppressWarnings("unused") boolean value) {
362362
return 1;
363363
}
364364

365365
@Specialization(guards = {"value < 0"})
366-
public long factorialNegativeInt(int value) {
366+
public long factorialNegativeInt(@SuppressWarnings("unused") int value) {
367367
throw raise(PythonErrorType.ValueError, "factorial() not defined for negative values");
368368
}
369369

@@ -379,7 +379,7 @@ public PInt factorialInt(int value) {
379379
}
380380

381381
@Specialization(guards = {"value < 0"})
382-
public long factorialNegativeLong(long value) {
382+
public long factorialNegativeLong(@SuppressWarnings("unused") long value) {
383383
throw raise(PythonErrorType.ValueError, "factorial() not defined for negative values");
384384
}
385385

@@ -395,12 +395,12 @@ public PInt factorialLong(long value) {
395395
}
396396

397397
@Specialization(guards = "isNegative(value)")
398-
public Object factorialPINegative(PInt value) {
398+
public Object factorialPINegative(@SuppressWarnings("unused") PInt value) {
399399
throw raise(PythonErrorType.ValueError, "factorial() not defined for negative values");
400400
}
401401

402402
@Specialization(guards = "isOvf(value)")
403-
public Object factorialPIOvf(PInt value) {
403+
public Object factorialPIOvf(@SuppressWarnings("unused") PInt value) {
404404
throw raise(PythonErrorType.OverflowError, "factorial() argument should not exceed %l", Long.MAX_VALUE);
405405
}
406406

@@ -415,27 +415,27 @@ public Object factorial(PInt value) {
415415
}
416416

417417
@Specialization(guards = {"isNaN(value)"})
418-
public long factorialDoubleNaN(double value) {
418+
public long factorialDoubleNaN(@SuppressWarnings("unused") double value) {
419419
throw raise(PythonErrorType.ValueError, "cannot convert float NaN to integer");
420420
}
421421

422422
@Specialization(guards = {"isInfinite(value)"})
423-
public long factorialDoubleInfinite(double value) {
423+
public long factorialDoubleInfinite(@SuppressWarnings("unused") double value) {
424424
throw raise(PythonErrorType.ValueError, "cannot convert float infinity to integer");
425425
}
426426

427427
@Specialization(guards = "isNegative(value)")
428-
public PInt factorialDoubleNegative(double value) {
428+
public PInt factorialDoubleNegative(@SuppressWarnings("unused") double value) {
429429
throw raise(PythonErrorType.ValueError, "factorial() not defined for negative values");
430430
}
431431

432432
@Specialization(guards = "!isInteger(value)")
433-
public PInt factorialDoubleNotInteger(double value) {
433+
public PInt factorialDoubleNotInteger(@SuppressWarnings("unused") double value) {
434434
throw raise(PythonErrorType.ValueError, "factorial() only accepts integral values");
435435
}
436436

437437
@Specialization(guards = "isOvf(value)")
438-
public PInt factorialDoubleOvf(double value) {
438+
public PInt factorialDoubleOvf(@SuppressWarnings("unused") double value) {
439439
throw raise(PythonErrorType.OverflowError, "factorial() argument should not exceed %l", Long.MAX_VALUE);
440440
}
441441

@@ -450,27 +450,27 @@ public Object factorialDouble(double value) {
450450
}
451451

452452
@Specialization(guards = {"isNaN(value.getValue())"})
453-
public long factorialPFLNaN(PFloat value) {
453+
public long factorialPFLNaN(@SuppressWarnings("unused") PFloat value) {
454454
throw raise(PythonErrorType.ValueError, "cannot convert float NaN to integer");
455455
}
456456

457457
@Specialization(guards = {"isInfinite(value.getValue())"})
458-
public long factorialPFLInfinite(PFloat value) {
458+
public long factorialPFLInfinite(@SuppressWarnings("unused") PFloat value) {
459459
throw raise(PythonErrorType.ValueError, "cannot convert float infinity to integer");
460460
}
461461

462462
@Specialization(guards = "isNegative(value.getValue())")
463-
public PInt factorialPFLNegative(PFloat value) {
463+
public PInt factorialPFLNegative(@SuppressWarnings("unused") PFloat value) {
464464
throw raise(PythonErrorType.ValueError, "factorial() not defined for negative values");
465465
}
466466

467467
@Specialization(guards = "!isInteger(value.getValue())")
468-
public PInt factorialPFLNotInteger(PFloat value) {
468+
public PInt factorialPFLNotInteger(@SuppressWarnings("unused") PFloat value) {
469469
throw raise(PythonErrorType.ValueError, "factorial() only accepts integral values");
470470
}
471471

472472
@Specialization(guards = "isOvf(value.getValue())")
473-
public PInt factorialPFLOvf(PFloat value) {
473+
public PInt factorialPFLOvf(@SuppressWarnings("unused") PFloat value) {
474474
throw raise(PythonErrorType.OverflowError, "factorial() argument should not exceed %l", Long.MAX_VALUE);
475475
}
476476

@@ -753,12 +753,12 @@ public PTuple frexpO(Object value,
753753
@GenerateNodeFactory
754754
public abstract static class IsNanNode extends PythonUnaryBuiltinNode {
755755
@Specialization
756-
public boolean isNan(long value) {
756+
public boolean isNan(@SuppressWarnings("unused") long value) {
757757
return false;
758758
}
759759

760760
@Specialization
761-
public boolean isNan(PInt value) {
761+
public boolean isNan(@SuppressWarnings("unused") PInt value) {
762762
return false;
763763
}
764764

@@ -803,17 +803,17 @@ private boolean isCloseDouble(double a, double b, double rel_tol, double abs_tol
803803
}
804804

805805
@Specialization
806-
public boolean isClose(double a, double b, PNone rel_tol, PNone abs_tol) {
806+
public boolean isClose(double a, double b, @SuppressWarnings("unused") PNone rel_tol, @SuppressWarnings("unused") PNone abs_tol) {
807807
return isCloseDouble(a, b, DEFAULT_REL, DEFAULT_ABS);
808808
}
809809

810810
@Specialization
811-
public boolean isClose(double a, double b, PNone rel_tol, double abs_tol) {
811+
public boolean isClose(double a, double b, @SuppressWarnings("unused") PNone rel_tol, double abs_tol) {
812812
return isCloseDouble(a, b, DEFAULT_REL, abs_tol);
813813
}
814814

815815
@Specialization
816-
public boolean isClose(double a, double b, double rel_tol, PNone abs_tol) {
816+
public boolean isClose(double a, double b, double rel_tol, @SuppressWarnings("unused") PNone abs_tol) {
817817
return isCloseDouble(a, b, rel_tol, DEFAULT_ABS);
818818
}
819819

@@ -823,7 +823,7 @@ public boolean isClose(double a, double b, double rel_tol, double abs_tol) {
823823
}
824824

825825
@Specialization
826-
public boolean isClose(double a, long b, double rel_tol, PNone abs_tol) {
826+
public boolean isClose(double a, long b, double rel_tol, @SuppressWarnings("unused") PNone abs_tol) {
827827
return isCloseDouble(a, b, rel_tol, DEFAULT_ABS);
828828
}
829829
}
@@ -867,7 +867,7 @@ private double exceptInfinity(double result, double arg) {
867867
}
868868

869869
@Specialization
870-
public double ldexpDD(double mantissa, double exp) {
870+
public double ldexpDD(@SuppressWarnings("unused") double mantissa, @SuppressWarnings("unused") double exp) {
871871
throw raise(TypeError, EXPECTED_INT_MESSAGE);
872872
}
873873

@@ -877,7 +877,7 @@ public double ldexpDD(double mantissa, long exp) {
877877
}
878878

879879
@Specialization
880-
public double ldexpLD(long mantissa, double exp) {
880+
public double ldexpLD(@SuppressWarnings("unused") long mantissa, @SuppressWarnings("unused") double exp) {
881881
throw raise(TypeError, EXPECTED_INT_MESSAGE);
882882
}
883883

@@ -906,7 +906,7 @@ public double ldexpPIPI(PInt mantissa, PInt exp) {
906906
}
907907

908908
@Specialization
909-
public double ldexpPID(PInt mantissa, double exp) {
909+
public double ldexpPID(@SuppressWarnings("unused") PInt mantissa, @SuppressWarnings("unused") double exp) {
910910
throw raise(TypeError, EXPECTED_INT_MESSAGE);
911911
}
912912

@@ -917,7 +917,7 @@ public double ldexpPIL(PInt mantissa, long exp) {
917917
}
918918

919919
@Fallback
920-
public double ldexpOO(Object mantissa, Object exp) {
920+
public double ldexpOO(Object mantissa, @SuppressWarnings("unused") Object exp) {
921921
if (!MathGuards.isNumber(mantissa)) {
922922
throw raise(TypeError, "must be real number, not %p", mantissa);
923923
}
@@ -1118,27 +1118,27 @@ PInt gcd(PInt x, PInt y) {
11181118
}
11191119

11201120
@Specialization
1121-
int gcd(double x, double y) {
1121+
int gcd(@SuppressWarnings("unused") double x, @SuppressWarnings("unused") double y) {
11221122
throw raise(TypeError, "'float' object cannot be interpreted as an integer");
11231123
}
11241124

11251125
@Specialization
1126-
int gcd(long x, double y) {
1126+
int gcd(@SuppressWarnings("unused") long x, @SuppressWarnings("unused") double y) {
11271127
throw raise(TypeError, "'float' object cannot be interpreted as an integer");
11281128
}
11291129

11301130
@Specialization
1131-
int gcd(double x, long y) {
1131+
int gcd(@SuppressWarnings("unused") double x, @SuppressWarnings("unused") long y) {
11321132
throw raise(TypeError, "'float' object cannot be interpreted as an integer");
11331133
}
11341134

11351135
@Specialization
1136-
int gcd(double x, PInt y) {
1136+
int gcd(@SuppressWarnings("unused") double x, @SuppressWarnings("unused") PInt y) {
11371137
throw raise(TypeError, "'float' object cannot be interpreted as an integer");
11381138
}
11391139

11401140
@Specialization
1141-
int gcd(PInt x, double y) {
1141+
int gcd(@SuppressWarnings("unused") PInt x, @SuppressWarnings("unused") double y) {
11421142
throw raise(TypeError, "'float' object cannot be interpreted as an integer");
11431143
}
11441144

@@ -1324,12 +1324,12 @@ public double count(double value) {
13241324
public abstract static class IsFiniteNode extends PythonUnaryBuiltinNode {
13251325

13261326
@Specialization
1327-
public boolean isfinite(long value) {
1327+
public boolean isfinite(@SuppressWarnings("unused") long value) {
13281328
return true;
13291329
}
13301330

13311331
@Specialization
1332-
public boolean isfinite(PInt value) {
1332+
public boolean isfinite(@SuppressWarnings("unused") PInt value) {
13331333
return true;
13341334
}
13351335

@@ -1352,12 +1352,12 @@ public boolean isinf(Object value,
13521352
public abstract static class IsInfNode extends PythonUnaryBuiltinNode {
13531353

13541354
@Specialization
1355-
public boolean isinf(long value) {
1355+
public boolean isinf(@SuppressWarnings("unused") long value) {
13561356
return false;
13571357
}
13581358

13591359
@Specialization
1360-
public boolean isinf(PInt value) {
1360+
public boolean isinf(@SuppressWarnings("unused") PInt value) {
13611361
return false;
13621362
}
13631363

@@ -1441,15 +1441,15 @@ public double log(long value, PNone novalue,
14411441
}
14421442

14431443
@Specialization
1444-
public double logDN(double value, PNone novalue,
1444+
public double logDN(double value, @SuppressWarnings("unused") PNone novalue,
14451445
@Cached("createBinaryProfile()") ConditionProfile doNotFit) {
14461446
raiseMathError(doNotFit, value <= 0);
14471447
return Math.log(value);
14481448
}
14491449

14501450
@Specialization
14511451
@TruffleBoundary
1452-
public double logPIN(PInt value, PNone novalue,
1452+
public double logPIN(PInt value, @SuppressWarnings("unused") PNone novalue,
14531453
@Cached("createBinaryProfile()") ConditionProfile doNotFit) {
14541454
BigInteger bValue = value.getValue();
14551455
raiseMathError(doNotFit, bValue.compareTo(BigInteger.ZERO) == -1);
@@ -1995,7 +1995,7 @@ static double m_erf_series(double x) {
19951995
}
19961996

19971997
static double m_erfc_contfrac(double x) {
1998-
double x2, a, da, p, p_last, q, q_last, b, result;
1998+
double x2, a, da, p, p_last, q, q_last, b;
19991999
int i;
20002000

20012001
if (x >= ERFC_CONTFRAC_CUTOFF) {

0 commit comments

Comments
 (0)