Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#140 closed defect (fixed)

Compiler warning in TVideoIOBitsStartCode::getFileLocation()

Reported by: hao Owned by:
Priority: trivial Milestone:
Component: HM Version:
Keywords: Cc: fbossen, ksuehring, davidf, jct-vc@…

Description

Data type of return value of std::fstream::tellg() is not "long" but "std::streampos".
Their sizes may be different depending on compilers.
At least 64-bit compiler of MS Visual C++ 2008 in 32-bit Windows gives warning about implicit data type conversion from std::streampos to long.
Although it is practically harmless for the current standardization activity, it violates HEVC software guidelines.

Revised code to fix this issue is shown below.
(Line number is based on HM-2.2)

Line 89-90 in TVideoIOBits.h:

streampos getFileLocation () { return m_cHandle.tellg(); }
Void setFileLocation (streampos uiLocation) { m_cHandle.seekg(uiLocation); }

Line 114 in TAppDecTop.cpp:

streampos lLocation = m_cTVideoIOBitstreamFile.getFileLocation();

Change History (5)

comment:1 Changed 13 years ago by ksuehring

  • Resolution set to fixed
  • Status changed from new to closed

comment:2 Changed 13 years ago by ksuehring

fixed in r804

comment:3 Changed 12 years ago by davidf

  • Component set to HM

Updating component after adding WD (Text) tickets

comment:4 Changed 12 years ago by davidf

  • Cc fbossen ksuehring davidf added

comment:5 Changed 12 years ago by davidf

  • Cc jct-vc@… added
Note: See TracTickets for help on using tickets.

This list contains all users that will be notified about changes made to this ticket.

These roles will be notified: Reporter, Owner, Subscriber, Participant

  • David Flynn(Subscriber, Participant)
  • Frank Bossen(Subscriber)
  • Hirofumi Aoki(Reporter)
  • jct-vc@…(Subscriber)
  • karl.sharman@…(Always)
  • Karsten Suehring(Subscriber, Participant, Always)