[MacPorts] #62307: gnuregex @0.12_2: error: implicit declaration of function 'free' is invalid in C99
MacPorts
noreply at macports.org
Tue Feb 16 00:54:09 UTC 2021
#62307: gnuregex @0.12_2: error: implicit declaration of function 'free' is invalid
in C99
-----------------------------+----------------------
Reporter: cooljeanius | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.6.4
Keywords: bigsur catalina | Port: gnuregex
-----------------------------+----------------------
Another victim of -Werror=implicit-function-declaration being on by
default now:
{{{
make: Entering directory
`/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_gnuregex/gnuregex/work/regex-0.12'
/usr/bin/clang -g -DHAVE_STRING_H=1 -Dconst= -I. -I. -c regex.c
regex.c:69:7: warning: incompatible redeclaration of library function
'malloc' [-Wincompatible-library-redeclaration]
char *malloc ();
^
regex.c:69:7: note: 'malloc' is a builtin with type 'void *(unsigned
long)'
regex.c:70:7: warning: incompatible redeclaration of library function
'realloc' [-Wincompatible-library-redeclaration]
char *realloc ();
^
regex.c:70:7: note: 'realloc' is a builtin with type 'void *(void *,
unsigned long)'
regex.c:1629:17: warning: add explicit braces to avoid dangling else
[-Wdangling-else]
else
^
regex.c:1649:17: warning: add explicit braces to avoid dangling else
[-Wdangling-else]
else
^
regex.c:2042:3: error: implicit declaration of function 'free' is invalid
in C99 [-Werror,-Wimplicit-function-declaration]
free (compile_stack.stack);
^
regex.c:2784:11: error: implicitly declaring library function 'abort' with
type 'void (void) __attribute__((noreturn))' [-Werror,-Wimplicit-function-
declaration]
abort (); /* We have listed all the cases. */
^
regex.c:2784:11: note: include the header <stdlib.h> or explicitly provide
a declaration for 'abort'
regex.c:2834:33: warning: expression which evaluates to zero treated as a
null pointer constant of type 'regoff_t *' (aka 'int *') [-Wnon-literal-
null-conversion]
regs->start = regs->end = (regoff_t) 0;
^~~~~~~~~~~~
regex.c:3771:19: warning: cast to 'fail_stack_elt_t' (aka 'unsigned char
*') from smaller integer type 'unsigned int' [-Wint-to-pointer-cast]
PUSH_FAILURE_POINT (p1 + mcnt, d, -2);
^
regex.c:2407:5: note: expanded from macro 'PUSH_FAILURE_POINT'
PUSH_FAILURE_ITEM (lowest_active_reg); \
^
regex.c:2328:42: note: expanded from macro 'PUSH_FAILURE_ITEM'
fail_stack.stack[fail_stack.avail++] = (fail_stack_elt_t) item
^
regex.c:3771:19: warning: cast to 'fail_stack_elt_t' (aka 'unsigned char
*') from smaller integer type 'unsigned int' [-Wint-to-pointer-cast]
regex.c:2410:5: note: expanded from macro 'PUSH_FAILURE_POINT'
PUSH_FAILURE_ITEM (highest_active_reg); \
^
regex.c:2328:42: note: expanded from macro 'PUSH_FAILURE_ITEM'
fail_stack.stack[fail_stack.avail++] = (fail_stack_elt_t) item
^
regex.c:3918:11: warning: cast to 'fail_stack_elt_t' (aka 'unsigned char
*') from smaller integer type 'unsigned int' [-Wint-to-pointer-cast]
PUSH_FAILURE_POINT (p + mcnt, NULL, -2);
^
regex.c:2407:5: note: expanded from macro 'PUSH_FAILURE_POINT'
PUSH_FAILURE_ITEM (lowest_active_reg); \
^
regex.c:2328:42: note: expanded from macro 'PUSH_FAILURE_ITEM'
fail_stack.stack[fail_stack.avail++] = (fail_stack_elt_t) item
^
regex.c:3918:11: warning: cast to 'fail_stack_elt_t' (aka 'unsigned char
*') from smaller integer type 'unsigned int' [-Wint-to-pointer-cast]
regex.c:2410:5: note: expanded from macro 'PUSH_FAILURE_POINT'
PUSH_FAILURE_ITEM (highest_active_reg); \
^
regex.c:2328:42: note: expanded from macro 'PUSH_FAILURE_ITEM'
fail_stack.stack[fail_stack.avail++] = (fail_stack_elt_t) item
^
regex.c:3971:11: warning: cast to 'fail_stack_elt_t' (aka 'unsigned char
*') from smaller integer type 'unsigned int' [-Wint-to-pointer-cast]
PUSH_FAILURE_POINT (p + mcnt, d, -2);
^
regex.c:2407:5: note: expanded from macro 'PUSH_FAILURE_POINT'
PUSH_FAILURE_ITEM (lowest_active_reg); \
^
regex.c:2328:42: note: expanded from macro 'PUSH_FAILURE_ITEM'
fail_stack.stack[fail_stack.avail++] = (fail_stack_elt_t) item
^
regex.c:3971:11: warning: cast to 'fail_stack_elt_t' (aka 'unsigned char
*') from smaller integer type 'unsigned int' [-Wint-to-pointer-cast]
regex.c:2410:5: note: expanded from macro 'PUSH_FAILURE_POINT'
PUSH_FAILURE_ITEM (highest_active_reg); \
^
regex.c:2328:42: note: expanded from macro 'PUSH_FAILURE_ITEM'
fail_stack.stack[fail_stack.avail++] = (fail_stack_elt_t) item
^
regex.c:4110:11: warning: cast to 'fail_stack_elt_t' (aka 'unsigned char
*') from smaller integer type 'unsigned int' [-Wint-to-pointer-cast]
PUSH_FAILURE_POINT (0, 0, -2);
^
regex.c:2407:5: note: expanded from macro 'PUSH_FAILURE_POINT'
PUSH_FAILURE_ITEM (lowest_active_reg); \
^
regex.c:2328:42: note: expanded from macro 'PUSH_FAILURE_ITEM'
fail_stack.stack[fail_stack.avail++] = (fail_stack_elt_t) item
^
regex.c:4110:11: warning: cast to 'fail_stack_elt_t' (aka 'unsigned char
*') from smaller integer type 'unsigned int' [-Wint-to-pointer-cast]
regex.c:2410:5: note: expanded from macro 'PUSH_FAILURE_POINT'
PUSH_FAILURE_ITEM (highest_active_reg); \
^
regex.c:2328:42: note: expanded from macro 'PUSH_FAILURE_ITEM'
fail_stack.stack[fail_stack.avail++] = (fail_stack_elt_t) item
^
regex.c:4123:11: warning: cast to 'fail_stack_elt_t' (aka 'unsigned char
*') from smaller integer type 'unsigned int' [-Wint-to-pointer-cast]
PUSH_FAILURE_POINT (0, 0, -2);
^
regex.c:2407:5: note: expanded from macro 'PUSH_FAILURE_POINT'
PUSH_FAILURE_ITEM (lowest_active_reg); \
^
regex.c:2328:42: note: expanded from macro 'PUSH_FAILURE_ITEM'
fail_stack.stack[fail_stack.avail++] = (fail_stack_elt_t) item
^
regex.c:4123:11: warning: cast to 'fail_stack_elt_t' (aka 'unsigned char
*') from smaller integer type 'unsigned int' [-Wint-to-pointer-cast]
regex.c:2410:5: note: expanded from macro 'PUSH_FAILURE_POINT'
PUSH_FAILURE_ITEM (highest_active_reg); \
^
regex.c:2328:42: note: expanded from macro 'PUSH_FAILURE_ITEM'
fail_stack.stack[fail_stack.avail++] = (fail_stack_elt_t) item
^
regex.c:4863:7: error: implicit declaration of function 'free' is invalid
in C99 [-Werror,-Wimplicit-function-declaration]
free (regs.start);
^
regex.c:4924:5: error: implicit declaration of function 'free' is invalid
in C99 [-Werror,-Wimplicit-function-declaration]
free (preg->buffer);
^
15 warnings and 4 errors generated.
make: *** [regex.o] Error 1
make: Leaving directory
`/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_gnuregex/gnuregex/work/regex-0.12'
Command failed: cd
"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_gnuregex/gnuregex/work/regex-0.12"
&& /usr/bin/make -j16 -w all subdirs=test
Exit code: 2
Error: Failed to build gnuregex: command execution failed
DEBUG: Error code: CHILDSTATUS 69307 2
}}}
--
Ticket URL: <https://trac.macports.org/ticket/62307>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list