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

Fix compilation #7

Closed
wants to merge 3 commits into from
Closed

Fix compilation #7

wants to merge 3 commits into from

Conversation

BubuOT
Copy link

@BubuOT BubuOT commented Nov 7, 2023

These changes are necessary for me to compile the project under gcc 11.4.0

Disable this gcc warning introduced in some newer release to fix the
compilation. (Werror prevents it otherwise)
Fixes the followng linker error:
  ems_serio/serial.c:10: multiple definition of `tios'; [...] ems_serio/ems_serio.c:27: first defined here
Fixes the following linker error:
  ems_serio/tx.c:15: multiple definition of `client_id'; [...] ems_serio/rx.c:17: first defined here
@CreaValix
Copy link
Owner

Hi @BubuOT, thanks for your changes. client_id was supposed to be one symbol between rx.c and tx.c. I just corrected this in another push.

Why did you need -Wno-unused-result? According to the documentation , means to „Do not warn if a caller of a function marked with attribute warn_unused_result does not use its return value“.

The unused struct is fixed already.

@CreaValix
Copy link
Owner

My bad, I executed make manually. It seems that indeed setup.py sets warn_unused_result for functions somehow.

I fixed it by using the return value of write().

It should all compile on gcc 11 and higher now.

@CreaValix CreaValix closed this Dec 6, 2023
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.

None yet

2 participants