tags 848231 fixed-upstream thanks On 15 December 2016 at 13:55, Ian Jackson <ijack...@chiark.greenend.org.uk> wrote: > Package: manpages-dev > Version: 3.74-1 > Severity: minor > > I cut and pasted the example program from scandir(3) and found that it > had some bugs which caused compiler warnings with -Wall. Here is a > patch (to the example program, not to the nroff) to fix them. > > Thanks, > Ian. > > --- t.c.orig 2016-12-15 12:52:33.181859142 +0000 > +++ t.c 2016-12-15 12:55:08.939521298 +0000 > @@ -1,6 +1,8 @@ > #define _SVID_SOURCE > /* print files in current directory in reverse order */ > #include <dirent.h> > + #include <stdio.h> > + #include <stdlib.h> > > int > main(void) > @@ -18,4 +20,5 @@ > } > free(namelist); > } > + return 0; > } >
Thanks, Ian. Fixed pretty much as you suggest. The program doesn't even compile as it was given! Looks like I injected the error after a user report 4 years ago (changed "0" to "NULL"). Cheers, Michael -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/