On 01/06/2015 07:14 AM, Ted Carr wrote:
there were still some error messages during compilation:
Those are harmless on your platform. They were fixed by the attached patch to exclude.c, which should appear in the next release of GNU tar.
The test failures, the last time I recall reviewing them, were not a big deal but if someone wants to investigate and fix them that'd be nice.
diff --git a/ChangeLog b/ChangeLog index fb25112..5d38d82 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2014-04-18 Paul Eggert <[email protected]> + + exclude: port to strict C99 + Strict C does not allow converting a function pointer to void * + and vice versa. Pass a pointer to a function pointer instead. + * lib/exclude.c (add_exclude_file): + Pass the address of the function pointer. + (call_addfn): And deference the address here, to match. + 2014-04-17 Paul Eggert <[email protected]> regex: do not depend on malloc-gnu diff --git a/lib/exclude.c b/lib/exclude.c index 201394a..14b59b7 100644 --- a/lib/exclude.c +++ b/lib/exclude.c @@ -668,8 +668,8 @@ add_exclude_fp (void (*add_func) (struct exclude *, char const *, int, void *), static void call_addfn (struct exclude *ex, char const *pattern, int options, void *data) { - void (*addfn) (struct exclude *, char const *, int) = data; - addfn (ex, pattern, options); + void (**addfnptr) (struct exclude *, char const *, int) = data; + (*addfnptr) (ex, pattern, options); } int @@ -686,7 +686,7 @@ add_exclude_file (void (*add_func) (struct exclude *, char const *, int), else if (! (in = fopen (file_name, "r"))) return -1; - rc = add_exclude_fp (call_addfn, ex, in, options, line_end, add_func); + rc = add_exclude_fp (call_addfn, ex, in, options, line_end, &add_func); if (!use_stdin && fclose (in) != 0) rc = -1;
