Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#10522 closed Patch - Bug Fix (Fixed)

Correct compiler warning about unsigned comparison

Reported by: Gary Buhrmaster <gary.buhrmaster@…> Owned by: danielk
Priority: minor Milestone: 0.27
Component: MythTV - Blu-ray Playback Version: Master Head
Severity: low Keywords:
Cc: Ticket locked: no


Remove pendantic compiler warning about comparison of unsigned expression in bdringbuffer.cpp

In bdringbuffer, the chapter variable is declared as a unsigned integer. The tests for chapter<0 will always be false (and may be optimized out by a good compiler). The supplied patch removes the code which results in the (pendantic) warning message.

change: if (chapter < 0
chapter >= GetNumChapters?())

to: if (chapter >= GetNumChapters?())

Patch attached.

Attachments (1)

bdringbuffer_cpp.patch (959 bytes) - added by Gary Buhrmaster <gary.buhrmaster@…> 9 years ago.

Download all attachments as: .zip

Change History (6)

Changed 9 years ago by Gary Buhrmaster <gary.buhrmaster@…>

Attachment: bdringbuffer_cpp.patch added

comment:1 Changed 9 years ago by robertm

Owner: robertm deleted
Status: newassigned

comment:2 Changed 9 years ago by Raymond Wagner

Status: assignednew

comment:3 Changed 8 years ago by gary.buhrmaster@…

It appears that Danielk, in commit 42e3b74b91d6de458773729f242e043e7f359b2a fixed this a couple of days ago as part of code cleanup.

Please close this ticket.

comment:4 Changed 8 years ago by sphery

Milestone: unknown0.27
Resolution: Fixed
Status: newclosed

Fixed in 42e3b74b9:

Address a couple sign change issues (gcc warnings).

comment:5 Changed 8 years ago by sphery

Owner: set to danielk
Note: See TracTickets for help on using tickets.