ref: 6eed67fe0cb48cbc73aff47ac260a30e54eb0763
parent: 49764212b5e807e4bd91c31e30c946636224ecbd
author: Mark Harris <mark.hsj@gmail.com>
date: Tue Apr 28 19:12:05 EDT 2020
opusdec: Silence clang 10 conversion warning src/opusdec.c:581:28: warning: implicit conversion from 'int' to 'float' changes value from 2147483647 to 2147483648 [-Wimplicit-int-float-conversion]
--- a/src/opusdec.c
+++ b/src/opusdec.c
@@ -578,7 +578,7 @@
(void)nchannels;
(void)li;
lost = ctx->loss_percent>0
- && 100*((float)rand())/RAND_MAX<ctx->loss_percent;
+ && 100*(float)rand()/(float)RAND_MAX<ctx->loss_percent;
switch (format)
{
case OP_DEC_FORMAT_SHORT: