Opened 16 years ago
Closed 16 years ago
#7160 closed defect (invalid)
Implicit sign extension
Reported by: | Owned by: | Isaac Richards | |
---|---|---|---|
Priority: | trivial | Milestone: | unknown |
Component: | MythTV - General | Version: | head |
Severity: | low | Keywords: | |
Cc: | Ticket locked: | no |
Description
When going from one fixed signed type to a larger (signed or unsigned) through implicit casting, the caller might be accidentally extending the sign bit. It is likely better to explicitly cast before manipulation to the final value. There is a case of this implicit sign extension in FrequencyListDescriptor::Frequency() in libmythtv.
Attachments (1)
Change History (2)
Changed 16 years ago by
Attachment: | libs_libmythtv-sign-extension added |
---|
comment:1 Changed 16 years ago by
Milestone: | unknown |
---|---|
Resolution: | → invalid |
Status: | new → closed |
shouldn't be a problem since _data is (unsigned char*)
Note: See
TracTickets for help on using
tickets.
Use explicit casting to avoid implicit sign extensions