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 Errors with GCC 8.3 #62

Open
Digicrat opened this issue Feb 10, 2020 · 4 comments
Open

Compilation Errors with GCC 8.3 #62

Digicrat opened this issue Feb 10, 2020 · 4 comments

Comments

@Digicrat
Copy link

Compilation fails out of the box with GCC 8.3

src/httplib_error_string.c: In function ‘httplib_error_string’:
src/httplib_error_string.c:170:2: error: ignoring return value of ‘strerror_r’, declared with attribute warn_unused_result [-Werror=unused-result]
  strerror_r( error_code, buf, buf_len );
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:149: obj/httplib_error_string.o] Error 1

Adding "-Wno-error=unused-result" to the Makefile is a quick-fix for this error, but doesn't resolve the underlying issue.

@lammertb
Copy link
Owner

Thanks for reporting. Which operating system does your development system running on? That make it easier for me to create a virtual machine with the same environment to simulate the error.

@PinPhreek
Copy link

I had this error as well, by simply using printf() in the sourcecode, I resolved the error but I think it was not a great solution.
OS: Lubuntu 18.04 with newest updates
I hope I could help.

@0dysseas
Copy link

Is there any update on the issue? I'm facing the same problem with gcc 7.5.0 on Ubuntu 18.04

@lcsmuller
Copy link

Facing the same issue with gcc 7.5.0 on Linux Mint 19.3

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

5 participants