Bug 71685

Summary: Make scandir check more reliable.
Product: fontconfig Reporter: Krzesimir Nowak <qdlacz>
Component: libraryAssignee: Akira TAGOH <akira>
Status: RESOLVED FIXED QA Contact: Behdad Esfahbod <freedesktop>
Severity: normal    
Priority: medium CC: akira, fontconfig-bugs, freedesktop
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Avoid warnings about unused parameter in scandir checks.

Description Krzesimir Nowak 2013-11-16 21:37:03 UTC
Created attachment 89339 [details]
Avoid warnings about unused parameter in scandir checks.

The scandir checks can fail because "comp" function inside the checks have some unused parameters. Normally the gcc does not warn (and errs because of -Werror here), but I had -Wall in CFLAGS and the checks failed.

Attached patch should fix the issue.
Comment 1 Behdad Esfahbod 2013-11-16 22:26:55 UTC
Ugh.  We shouldn't have -Werror to begin with.
Comment 2 Akira TAGOH 2013-11-18 02:59:05 UTC
Well, -Werror was required to check if posix_fadvise() is exactly available on the system. see Bug#52573 for more details. so I can't get rid of it unless we have any better idea for that issue. that said we can just turn it off for scandir testing.
Comment 3 Akira TAGOH 2013-11-18 06:37:51 UTC
Hmm, it may be also required to check scandir for NetBSD which has taken the callback function with different arguments.
Comment 4 Akira TAGOH 2013-12-02 10:24:39 UTC
Okay, fixed in git with the different way. that should works.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.