[vlc-commits] interface/dialog: fix iteration variable type compared to vlc_array_count

Filip Roséen git at videolan.org
Tue Feb 21 09:53:26 CET 2017


vlc | branch: master | Filip Roséen <filip at atch.se> | Mon Feb 20 15:15:04 2017 +0100| [fe5ef9bfff37a8537260283ff154ae2a0c398268] | committer: Thomas Guillem

interface/dialog: fix iteration variable type compared to vlc_array_count

Following the changes introduced by 7ecd927, the affected lines would
result in a warning due to signed vs unsigned integer comparision.

Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fe5ef9bfff37a8537260283ff154ae2a0c398268
---

 src/interface/dialog.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/interface/dialog.c b/src/interface/dialog.c
index 10e515d..d174de1 100644
--- a/src/interface/dialog.c
+++ b/src/interface/dialog.c
@@ -169,7 +169,7 @@ libvlc_InternalDialogInit(libvlc_int_t *p_libvlc)
 static int
 dialog_get_idx_locked(vlc_dialog_provider *p_provider, vlc_dialog_id *p_id)
 {
-    for (int i = 0; i < vlc_array_count(&p_provider->dialog_array); ++i)
+    for (size_t i = 0; i < vlc_array_count(&p_provider->dialog_array); ++i)
     {
         if (p_id == vlc_array_item_at_index(&p_provider->dialog_array, i))
             return i;
@@ -231,7 +231,7 @@ dialog_remove_locked(vlc_dialog_provider *p_provider, vlc_dialog_id *p_id)
 static void
 dialog_clear_all_locked(vlc_dialog_provider *p_provider)
 {
-    for (int i = 0; i < vlc_array_count(&p_provider->dialog_array); ++i)
+    for (size_t i = 0; i < vlc_array_count(&p_provider->dialog_array); ++i)
     {
         vlc_dialog_id *p_id =
             vlc_array_item_at_index(&p_provider->dialog_array, i);



More information about the vlc-commits mailing list