Opened 14 years ago

Closed 13 years ago

Last modified 13 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

Description

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@…> 14 years ago.

Download all attachments as: .zip

Change History (6)

by Gary Buhrmaster <gary.buhrmaster@…>, 14 years ago

Attachment: bdringbuffer_cpp.patch added

comment:1 by robertm, 14 years ago

Owner: robertm removed
Status: newassigned

comment:2 by Raymond Wagner, 14 years ago

Status: assignednew

comment:3 by gary.buhrmaster@…, 13 years ago

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 by sphery, 13 years ago

Milestone: unknown0.27
Resolution: Fixed
Status: newclosed

Fixed in 42e3b74b9:

Address a couple sign change issues (gcc warnings).

comment:5 by sphery, 13 years ago

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