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 warnings with GCC on Linux #35

Closed
eyalroz opened this issue May 31, 2022 · 1 comment · Fixed by #42
Closed

Compilation warnings with GCC on Linux #35

eyalroz opened this issue May 31, 2022 · 1 comment · Fixed by #42
Assignees
Labels
bug Something isn't working

Comments

@eyalroz
Copy link
Contributor

eyalroz commented May 31, 2022

  • Devuan GNU/Linux Chimaera
  • Development branch HEAD

Steps to reproduce

Configured with BUILD_TESTS and built.

Expected behaviour

No compiler warnings

Actual behaviour

/home/eyalroz/src/mine/dylib/tests/lib.cpp:4:18: warning: ‘pi_value’ initialized and declared ‘extern’
    4 | DYLIB_API double pi_value = 3.14159;
      |                  ^~~~~~~~
/home/eyalroz/src/mine/dylib/tests/lib.cpp:5:17: warning: ‘ptr’ initialized and declared ‘extern’
    5 | DYLIB_API void *ptr = (void *)1;
      |                 ^~~

Now, the warnings are pretty innocuous, but - maybe you should create an extern "C" block to avoid them? Or perhaps - a proper-C library?

@martin-olivier martin-olivier self-assigned this Jun 1, 2022
@martin-olivier martin-olivier added the bug Something isn't working label Jun 1, 2022
@martin-olivier
Copy link
Owner

As I'm currently working on #27 to be able to load C++ mangled symbols, the extern "C" block will be removed from DYLIB_API.

Those changes will fix unit tests GCC warnings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants