[FFmpeg-cvslog] lavu/avsscanf: Do not mix declaration and code.
Carl Eugen Hoyos
git at videolan.org
Sun Nov 18 04:52:33 EET 2018
ffmpeg | branch: master | Carl Eugen Hoyos <ceffmpeg at gmail.com> | Sun Nov 18 03:51:42 2018 +0100| [529debc98776f94651cc927c2c27cc6de611697f] | committer: Carl Eugen Hoyos
lavu/avsscanf: Do not mix declaration and code.
Fixes the following warning:
libavutil/avsscanf.c: In function 'decfloat':
libavutil/avsscanf.c:354:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
int bitlim = bits-3*(int)(rp-9);
^~~
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=529debc98776f94651cc927c2c27cc6de611697f
---
libavutil/avsscanf.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavutil/avsscanf.c b/libavutil/avsscanf.c
index 7c61b860ae..9b3685f34b 100644
--- a/libavutil/avsscanf.c
+++ b/libavutil/avsscanf.c
@@ -349,9 +349,10 @@ static double decfloat(FFFILE *f, int c, int bits, int emin, int sign, int pok)
/* Optimize small to mid-size integers (even in exp. notation) */
if (lnz<9 && lnz<=rp && rp < 18) {
+ int bitlim;
if (rp == 9) return sign * (double)x[0];
if (rp < 9) return sign * (double)x[0] / p10s[8-rp];
- int bitlim = bits-3*(int)(rp-9);
+ bitlim = bits-3*(int)(rp-9);
if (bitlim>30 || x[0]>>bitlim==0)
return sign * (double)x[0] * p10s[rp-10];
}
More information about the ffmpeg-cvslog
mailing list