[vlc-commits] [Git][videolan/vlc][master] android: device: use size_t for loop index

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri Mar 28 07:39:40 UTC 2025



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
3ee11e23 by Alexandre Janniaux at 2025-03-28T07:24:52+00:00
android: device: use size_t for loop index

Fix the following warning:

        ../../modules/audio_output/android/device.c:93:23: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
        for (int i = 0; i < ARRAY_SIZE(audio_output_by_soc); i++)
                        ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- - - - -


1 changed file:

- modules/audio_output/android/device.c


Changes:

=====================================
modules/audio_output/android/device.c
=====================================
@@ -90,7 +90,7 @@ static enum AudioOutput get_audio_output_from_device(void)
 
     int len = 0;
     char value[PROP_VALUE_MAX];
-    for (int i = 0; i < ARRAY_SIZE(audio_output_by_soc); i++)
+    for (size_t i = 0; i < ARRAY_SIZE(audio_output_by_soc); i++)
     {
         /* On return, len will equal (int)strlen(model_id) */
         len = __system_property_get(audio_output_by_soc[i].property, value);



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/3ee11e23766bc837023b150f45da1647bf7d79e0

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/3ee11e23766bc837023b150f45da1647bf7d79e0
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list