diff --git a/modules/control/oldrc.c b/modules/control/oldrc.c
index 92d0d4b1843573a0b68a21181f1017b8ebe5b90d..a348ef32d5c058f721f731c272a6bc79f7d4bd0e 100644
--- a/modules/control/oldrc.c
+++ b/modules/control/oldrc.c
@@ -1114,7 +1114,7 @@ static int Input( vlc_object_t *p_this, char const *psz_cmd,
             if (idx < 0)
                 goto out;
             size_t track_count = vlc_player_GetTrackCount(player, cat);
-            if (idx >= track_count )
+            if ((unsigned)idx >= track_count)
                 goto out;
             struct vlc_player_track const *track =
                 vlc_player_GetTrackAt(player, cat, (size_t)idx);