Closed bbonev closed 2 years ago
(void)unused_arg;
is also portable.
Now I see that there is one change that deserves a separate PR and review and it got included here (my mistake): https://github.com/eudev-project/eudev/pull/222/commits/dce2732c378656c708baeb4e9a1e2a775372ca66#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...
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.
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?
Sure, I double checked and we already depend on modern (#pragma once
) and gnu-compatible (__attribute__
) compilers already.
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.