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 warnings #222

Merged
merged 2 commits into from
Apr 9, 2022
Merged

Fix warnings #222

merged 2 commits into from
Apr 9, 2022

Conversation

bbonev
Copy link
Member

@bbonev bbonev commented Apr 6, 2022

No description provided.

@bbonev bbonev mentioned this pull request Apr 6, 2022
Copy link
Contributor

@lu-zero lu-zero left a comment

Choose a reason for hiding this comment

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

It might be more portable to use a #define and set it only if gcc or clang are in use.

@bbonev
Copy link
Member Author

bbonev commented Apr 6, 2022

An autoconf test plus a couple of ifdefs based on the result...

I did it that way because I think that ancient compilers should silently ignore unsupported attributes.

Do you have an example ancient compiler to test with? Then we can adjust to the resulting build with it.

@ArsenArsen
Copy link
Member

(void)unused_arg; is also portable.

@bbonev
Copy link
Member Author

bbonev commented Apr 6, 2022

Now I see that there is one change that deserves a separate PR and review and it got included here (my mistake): dce2732#diff-74ecd06b7b5ba73ee97dbca326e44e3dddf6e8841bda2e073b06bdc4d8bd158d - this one is more serious than the rest from this PR and requires extra attention

About the unused arguments warnings - eudev is Linux only and I have been thinking about a possible scenario where the __attribute__((unused)) may become a problem and I couldn't think of one...

@lu-zero
Copy link
Contributor

lu-zero commented Apr 8, 2022

About the unused arguments warnings - eudev is Linux only and I have been thinking about a possible scenario where the __attribute__((unused)) may become a problem and I couldn't think of one...

We can restrict to gcc and clang since pcc/tcc/cparser should fail already for unrelated reasons and swcc is no more. I guess just documenting it should be fine.

@bbonev
Copy link
Member Author

bbonev commented Apr 9, 2022

I have added a note in the build instructions about the modern C compiler requirement.
Also did some rewording of the neighboring paragraphs to use more passive language...

@lu-zero Can you please provide build from source instructions for Gentoo?

@lu-zero
Copy link
Contributor

lu-zero commented Apr 9, 2022

Sure, I double checked and we already depend on modern (#pragma once) and gnu-compatible (__attribute__) compilers already.

@bbonev bbonev merged commit 381d129 into eudev-project:master Apr 9, 2022
@bbonev bbonev deleted the warn branch May 26, 2022 16:24
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.

3 participants