[FFmpeg-cvslog] lls: mark max_order as unsigned short

Luca Barbato git at videolan.org
Fri Mar 1 13:37:50 CET 2013


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Mon Feb 25 10:37:39 2013 +0100| [399663be9d4a839b894c48a21b62926eb8497d72] | committer: Luca Barbato

lls: mark max_order as unsigned short

The value is within 0 and 32.

Remove an `array subscript is below array bounds` warning.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=399663be9d4a839b894c48a21b62926eb8497d72
---

 libavutil/lls.c |    2 +-
 libavutil/lls.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavutil/lls.c b/libavutil/lls.c
index 645e528..a26b3c2 100644
--- a/libavutil/lls.c
+++ b/libavutil/lls.c
@@ -48,7 +48,7 @@ void avpriv_update_lls(LLSModel *m, double *var, double decay)
     }
 }
 
-void avpriv_solve_lls(LLSModel *m, double threshold, int min_order)
+void avpriv_solve_lls(LLSModel *m, double threshold, unsigned short min_order)
 {
     int i, j, k;
     double (*factor)[MAX_VARS + 1] = (void *) &m->covariance[1][0];
diff --git a/libavutil/lls.h b/libavutil/lls.h
index 4b19798..abaf4a7 100644
--- a/libavutil/lls.h
+++ b/libavutil/lls.h
@@ -39,7 +39,7 @@ typedef struct LLSModel {
 
 void avpriv_init_lls(LLSModel *m, int indep_count);
 void avpriv_update_lls(LLSModel *m, double *param, double decay);
-void avpriv_solve_lls(LLSModel *m, double threshold, int min_order);
+void avpriv_solve_lls(LLSModel *m, double threshold, unsigned short min_order);
 double avpriv_evaluate_lls(LLSModel *m, double *param, int order);
 
 #ifndef FF_API_LLS_PRIVATE



More information about the ffmpeg-cvslog mailing list