-
Notifications
You must be signed in to change notification settings - Fork 701
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 getmntent check with -Werror. #799
base: master
Are you sure you want to change the base?
Conversation
The test program cannot be run. It always fails with a segmentation fault. A better one would be:
|
The test is not executed, but it needs to compile without warning if OP wants to use -Werror. |
The current check script will however compile even if mntent.h doesn't contain getmntent. The default declaration of getmntent is fine. The check could thus be simplified to A more (pointless) thorough check that checks for valid content of mntent.h could perhaps also do |
Is this still relevant ? |
Yes. The ifdef in libs/pbd/mountpoint.cc is just a safety check to make things clear. The test in libs/pbd/wscript is bogus:
So either
@kiilerix: Just using the include doesn't work, I just checked. I once suggested to add -Werror to Ardour but it was rejected. I like it because the build compiles cleanly without warnings, ergo every new warning clearly stands out, all the suppressed warnings could be removed one after another to get a cleaner repository. Dropping this patch and adding -Werror leads to a mysterious error:
So while it's not strictly necessary my suggestion would be just pull this request and be done with it. |
Fix a warning. The test is just compile tested and the return value is not used anyway.
Also, in my private build I compile with "-Werror" and without this patch this fails.
It also fails to build:
../libs/pbd/mountpoint.cc:114:10: fatal error: sys/ucred.h: Datei oder Verzeichnis nicht gefunden 114 | #include <sys/ucred.h> | ^~~~~~~~~~~~~ compilation terminated.