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

Quiet compiler warning/errors. #42

Merged
merged 2 commits into from
Jan 5, 2021
Merged

Quiet compiler warning/errors. #42

merged 2 commits into from
Jan 5, 2021

Conversation

abellgithub
Copy link
Collaborator

@wonder-sk : Does the (void)pointId; quiet things for you?

@wonder-sk
Copy link
Contributor

  • Yes (void)pointId; quiets that unused variable warning...

  • There is one unused variable warning left:

[6/17] Building CXX object src/providers/pdal/CMakeFiles/untwine.dir/__/__/__/external/untwine/epf/Grid.cpp.o
../external/untwine/epf/Grid.cpp: In member function ‘int untwine::epf::Grid::calcLevel()’:
../external/untwine/epf/Grid.cpp:45:12: warning: unused variable ‘limit’ [-Wunused-variable]
   45 |     double limit = (MaxPointsPerNode / 1000000.0);
      |            ^~~~~
  • I have realized I did not do a full rebuild and there is actually one more warning turned into an error when I compile in Release mode:
../untwine/ProgressWriter.cpp: In member function ‘void untwine::ProgressWriter::writeMessage(uint32_t, const string&)’:
../untwine/ProgressWriter.cpp:65:12: error: ignoring return value of ‘ssize_t write(int, const void*, size_t)’, declared with attribute warn_unused_result [-Werror=unused-result]
   65 |     ::write(m_progressFd, &percent, sizeof(percent));
      |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../untwine/ProgressWriter.cpp:67:12: error: ignoring return value of ‘ssize_t write(int, const void*, size_t)’, declared with attribute warn_unused_result [-Werror=unused-result]
   67 |     ::write(m_progressFd, &ssize, sizeof(ssize));
      |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../untwine/ProgressWriter.cpp:68:12: error: ignoring return value of ‘ssize_t write(int, const void*, size_t)’, declared with attribute warn_unused_result [-Werror=unused-result]
   68 |     ::write(m_progressFd, message.data(), ssize);
      |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors

Copy link
Contributor

@wonder-sk wonder-sk left a comment

Choose a reason for hiding this comment

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

Looking good - compiles fine without errors/warnings!

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.

2 participants