Skip to content

Fix initializer list order#867

Merged
cliffburdick merged 1 commit into
NVIDIA:mainfrom
tmartin-gh:tjm/tiff_warning
Feb 5, 2025
Merged

Fix initializer list order#867
cliffburdick merged 1 commit into
NVIDIA:mainfrom
tmartin-gh:tjm/tiff_warning

Conversation

@tmartin-gh

@tmartin-gh tmartin-gh commented Feb 5, 2025

Copy link
Copy Markdown
Collaborator

When matx.h is included in a .cpp file and libnvtiff is present on the system, there is an initializer list ordering error during compilation:

In file included from /build/_deps/matx-src/include/matx/file_io/file_io.h:50,
                 from /build/_deps/matx-src/include/matx.h:44,
                 from /workspace/src/test.cpp:2:
/build/_deps/matx-src/include/matx/file_io/tiff.h: In constructor 'matx::io::Tiff::Tiff(cudaStream_t, int)':
/build/_deps/matx-src/include/matx/file_io/tiff.h:135:22: error: 'matx::io::Tiff::stream_' will be initialized after [-Werror=reorder]
  135 |         cudaStream_t stream_;
      |                      ^~~~~~~
/build/_deps/matx-src/include/matx/file_io/tiff.h:133:13: error:   'int matx::io::Tiff::NUM_DECODERS_' [-Werror=reorder]
  133 |         int NUM_DECODERS_;
      |             ^~~~~~~~~~~~~
/build/_deps/matx-src/include/matx/file_io/tiff.h:53:9: error:   when initialized here [-Werror=reorder]
   53 |         Tiff(cudaStream_t stream=0, int NUM_DECODERS=1)
      |         ^~~~

This PR fixes the issue

@tmartin-gh

Copy link
Copy Markdown
Collaborator Author

/build

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 93.143% (-0.07%) from 93.209%
when pulling 7da0de0 on tmartin-gh:tjm/tiff_warning
into 4f84363 on NVIDIA:main.

@cliffburdick cliffburdick merged commit 1eb30e4 into NVIDIA:main Feb 5, 2025
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