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

Compilation error when building with -DCMAKE_BUILD_TYPE=Release #39

Open
lattice0 opened this issue Aug 18, 2019 · 1 comment
Open

Compilation error when building with -DCMAKE_BUILD_TYPE=Release #39

lattice0 opened this issue Aug 18, 2019 · 1 comment

Comments

@lattice0
Copy link

cmake -DCMAKE_BUILD_TYPE=Release .

Then I get

/home/lz/orwell/myRtspClient/third_party/JRTPLIB/src/rtprandomurandom.cpp: In member function ‘virtual uint8_t jrtplib::RTPRandomURandom::GetRandom8()’:
/home/lz/orwell/myRtspClient/third_party/JRTPLIB/src/rtprandomurandom.cpp:71:7: error: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Werror=unused-result]
  fread(&value, sizeof(uint8_t), 1, device);
  ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/lz/orwell/myRtspClient/third_party/JRTPLIB/src/rtprandomurandom.cpp: In member function ‘virtual uint16_t jrtplib::RTPRandomURandom::GetRandom16()’:
/home/lz/orwell/myRtspClient/third_party/JRTPLIB/src/rtprandomurandom.cpp:83:7: error: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Werror=unused-result]
  fread(&value, sizeof(uint16_t), 1, device);
  ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/lz/orwell/myRtspClient/third_party/JRTPLIB/src/rtprandomurandom.cpp: In member function ‘virtual uint32_t jrtplib::RTPRandomURandom::GetRandom32()’:
/home/lz/orwell/myRtspClient/third_party/JRTPLIB/src/rtprandomurandom.cpp:95:7: error: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Werror=unused-result]
  fread(&value, sizeof(uint32_t), 1, device);
  ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/lz/orwell/myRtspClient/third_party/JRTPLIB/src/rtprandomurandom.cpp: In member function ‘virtual double jrtplib::RTPRandomURandom::GetRandomDouble()’:
/home/lz/orwell/myRtspClient/third_party/JRTPLIB/src/rtprandomurandom.cpp:107:7: error: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Werror=unused-result]
  fread(&value, sizeof(uint64_t), 1, device);
  ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I'm confused, I've never compiled for Release, only Debug. I just accidentally turned Release on and got these errors. I understand what they mean but now I'm asking myself how it's possible that these errors have not been fixed? Haven't nobody ever compiled for Release?

@j0r1
Copy link
Owner

j0r1 commented Sep 1, 2019

On my system it compiles without any problem, it probably depends on compiler version or installed header files.

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

No branches or pull requests

2 participants