Files
tb 52e35ac9c3 cuetools: fix build with llvm22
error: chained comparison 'X < Y <= Z' does not behave the same as a mathematical expression [-Wparentheses]
2026-05-20 05:33:11 +00:00

24 lines
573 B
Plaintext

error: chained comparison 'X < Y <= Z' does not behave the same as a mathematical expression [-Wparentheses
Index: src/lib/cd.c
--- src/lib/cd.c.orig
+++ src/lib/cd.c
@@ -144,7 +144,7 @@ int cd_get_ntrack (Cd *cd)
Track *cd_get_track (Cd *cd, int i)
{
- if (0 < i <= cd->ntrack)
+ if (0 < i && i <= cd->ntrack)
return cd->track[i - 1];
return NULL;
@@ -277,7 +277,7 @@ int track_get_nindex (Track *track)
long track_get_index (Track *track, int i)
{
- if (0 <= i < track->nindex)
+ if (0 <= i && i < track->nindex)
return track->index[i];
return -1;