Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sign-compare warning when compiling with GCC 14 #1749

Conversation

JeanChristopheMorinPerso
Copy link
Member

Simple pull request to remove a new warning under GCC 14.

The warning is

/home/jcmorin/jcmenv/aswf/OpenTimelineIO/src/opentimelineio/stackAlgorithm.cpp: In function ‘void opentimelineio::v1_0::_normalize_tracks_lengths(std::vector<Track*>&, TrackRetainerVector&, ErrorStatus*)’:
/home/jcmorin/jcmenv/aswf/OpenTimelineIO/src/opentimelineio/stackAlgorithm.cpp:147:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<opentimelineio::v1_0::Track*>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  147 |     for (int i = 0; i < tracks.size(); i++)
      |                     ~~^~~~~~~~~~~~~~~

src/opentimelineio/stackAlgorithm.cpp Outdated Show resolved Hide resolved
Signed-off-by: Jean-Christophe Morin <[email protected]>
Copy link
Collaborator

@meshula meshula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome, thanks

@meshula meshula merged commit 48f09e2 into AcademySoftwareFoundation:main May 18, 2024
13 of 35 checks passed
darbyjohnston pushed a commit to darbyjohnston/OpenTimelineIO that referenced this pull request Jun 14, 2024
…oundation#1749)

* Fix sign-compare warning when compiling with GCC 14
* Use C size_t instead of C++ std::size_t

Signed-off-by: Jean-Christophe Morin <[email protected]>
Signed-off-by: Darby Johnston <[email protected]>
@reinecke reinecke added this to the Public Beta 17 milestone Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants