[MacPorts] #62300: byaccj @1.15_1: error: implicit declaration of function 'unlink' is invalid in C99

MacPorts noreply at macports.org
Sun Feb 14 19:54:05 UTC 2021


#62300: byaccj @1.15_1: error: implicit declaration of function 'unlink' is invalid
in C99
-------------------------+--------------------
 Reporter:  cooljeanius  |      Owner:  (none)
     Type:  defect       |     Status:  new
 Priority:  Normal       |  Milestone:
Component:  ports        |    Version:  2.6.4
 Keywords:               |       Port:  byaccj
-------------------------+--------------------
 Another victim of -Werror=implicit-function-declaration being on by
 default:
 {{{
 make: Entering directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_byaccj/byaccj/work/byaccj1.15/src'
 /usr/bin/clang -arch x86_64 -c -Os -I. closure.c -o closure.o
 /usr/bin/clang -arch x86_64 -c -Os -I. error.c -o error.o
 /usr/bin/clang -arch x86_64 -c -Os -I. lalr.c -o lalr.o
 /usr/bin/clang -arch x86_64 -c -Os -I. lr0.c -o lr0.o
 /usr/bin/clang -arch x86_64 -c -Os -I. main.c -o main.o
 /usr/bin/clang -arch x86_64 -c -Os -I. mkpar.c -o mkpar.o
 /usr/bin/clang -arch x86_64 -c -Os -I. output.c -o output.o
 /usr/bin/clang -arch x86_64 -c -Os -I. reader.c -o reader.o
 /usr/bin/clang -arch x86_64 -c -Os -I. skeleton.c -o skeleton.o
 /usr/bin/clang -arch x86_64 -c -Os -I. symtab.c -o symtab.o
 /usr/bin/clang -arch x86_64 -c -Os -I. verbose.c -o verbose.o
 /usr/bin/clang -arch x86_64 -c -Os -I. warshall.c -o warshall.o
 main.c:88:43: error: implicit declaration of function 'unlink' is invalid
 in C99 [-Werror,-Wimplicit-function-declaration]
   if (action_file) { fclose(action_file); unlink(action_file_name); }
                                           ^
 main.c:89:39: error: implicit declaration of function 'unlink' is invalid
 in C99 [-Werror,-Wimplicit-function-declaration]
   if (text_file) { fclose(text_file); unlink(text_file_name); }
                                       ^
 main.c:90:41: error: implicit declaration of function 'unlink' is invalid
 in C99 [-Werror,-Wimplicit-function-declaration]
   if (union_file) { fclose(union_file); unlink(union_file_name); }
                                         ^
 main.c:481:2: error: implicit declaration of function 'unlink' is invalid
 in C99 [-Werror,-Wimplicit-function-declaration]
         unlink(temp_output_file_name);
         ^
 mkpar.c:179:2: warning: add explicit braces to avoid dangling else
 [-Wdangling-else]
         else
         ^
 reader.c:320:7: warning: add explicit braces to avoid dangling else
 [-Wdangling-else]
       else
       ^
 4 errors generated.
 reader.c:451:7: warning: add explicit braces to avoid dangling else
 [-Wdangling-else]
       else
       ^
 output.c:846:30: warning: data argument not used by format string
 [-Wformat-extra-args]
         fprintf(defines_file, "}\n",jclass_name,JAVA_INTERFACE_SUFFIX);
                               ~~~~~ ^
 output.c:875:7: warning: add explicit braces to avoid dangling else
 [-Wdangling-else]
       else
       ^
 make: *** [main.o] Error 1
 make: *** Waiting for unfinished jobs....
 reader.c:1262:7: warning: add explicit braces to avoid dangling else
 [-Wdangling-else]
       else
       ^
 output.c:1439:2: warning: add explicit braces to avoid dangling else
 [-Wdangling-else]
         else
         ^
 output.c:1479:2: warning: add explicit braces to avoid dangling else
 [-Wdangling-else]
         else
         ^
 1 warning generated.
 4 warnings generated.
 3 warnings generated.
 make: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_byaccj/byaccj/work/byaccj1.15/src'
 Command failed:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_byaccj/byaccj/work/byaccj1.15/src"
 && /usr/bin/make -j16 -w all CC="/usr/bin/clang -arch x86_64" CFLAGS="-Os"
 LDFLAGS="-L/opt/local/lib -Wl,-headerpad_max_install_names"
 Exit code: 2
 Error: Failed to build byaccj: command execution failed
 DEBUG: Error code: CHILDSTATUS 41425 2
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/62300>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list