mirror of
https://github.com/openbsd/ports.git
synced 2026-06-17 23:13:55 +02:00
cuetools: fix build with llvm22
error: chained comparison 'X < Y <= Z' does not behave the same as a mathematical expression [-Wparentheses]
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
COMMENT= tools for handling audio-file cue sheets and toc files
|
||||
|
||||
DISTNAME= cuetools-1.3.1
|
||||
REVISION= 2
|
||||
REVISION= 3
|
||||
|
||||
CATEGORIES= audio textproc
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user