Skip to content

Commit

Permalink
Fix CodeQL warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Holger Friedrich <[email protected]>
  • Loading branch information
holgerfriedrich committed Aug 11, 2024
1 parent 5eedd27 commit b63edf9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public static void increaseMasterVolume(@ParamDoc(name = "percent") final float
if (newVolume - volume < .01) {
// the getMasterVolume() may only returns integers, so we have to make sure that we
// increase the volume level at least by 1%.
newVolume += .01;
newVolume += .01f;
}
if (newVolume > 1) {
newVolume = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ protected boolean waitFor(BooleanSupplier condition) {
* @return true on success, false on timeout
*/
protected boolean waitFor(BooleanSupplier condition, long timeout, long sleepTime) {
int waitingTime = 0;
long waitingTime = 0;
boolean rv;
while (!(rv = condition.getAsBoolean()) && waitingTime < timeout) {
waitingTime += sleepTime;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ protected boolean waitFor(BooleanSupplier condition) {
* @return true on success, false on timeout
*/
protected boolean waitFor(BooleanSupplier condition, long timeout, long sleepTime) {
int waitingTime = 0;
long waitingTime = 0;
boolean rv;
while (!(rv = condition.getAsBoolean()) && waitingTime < timeout) {
waitingTime += sleepTime;
Expand Down

0 comments on commit b63edf9

Please sign in to comment.