 |
fedora42用gcc15编译bash-5.2.15出错,提示mkbuiltins.c:267:29: error: too many arguments to function 'xmalloc'; expected 0, have 1。
解决方案: 打开sysdrv/source/buildroot/buildroot-2023.02.6/output/build/bash-5.2.15/builtins/mkbuiltins.c 将下面这些行修改正确。 行 62: static char *xmalloc (int bytes), *xrealloc (char *pointer, int bytes); 行 194: static int is_special_builtin (char *name); 行 195: static int is_assignment_builtin (char *name); 行 196: static int is_localvar_builtin (char *name); 行 197: static int is_posix_builtin (char *name); 行 198: static int is_arrayvar_builtin (char *name); 行 204: void extract_info (char *filename, FILE *structfile, FILE *externfile); 行 206: void file_error (char *filename); 行 207: void line_error (DEF_FILE *defs, char *format, ...); 行 209: void write_file_headers (FILE *structfile, FILE *externfile); 行 210: void write_file_footers (FILE *structfile, FILE *externfile); 行 211: void write_ifdefs (FILE *stream, char **defines); 行 212: void write_endifs (FILE *stream, char **defines); 行 213: void write_documentation (FILE *stream, char **documentation, int indentation, int flags); 行 214: void write_longdocs (FILE *stream, ARRAY *builtins); 行 215: void write_builtins (DEF_FILE *defs, FILE *structfile, FILE *externfile); 行 217: int write_helpfiles (ARRAY *builtins); 行 219: void free_defs (DEF_FILE *defs); 行 220: void add_documentation (DEF_FILE *defs, char *line); 行 222: void must_be_building (char *directive, DEF_FILE *defs); 行 223: void remove_trailing_whitespace (char *string);
第439-440行: 在第一个参数前加上(void *) array->array = (char **)xrealloc ((void *)array->array, (array->size += array->growth_rate) * array->width);
第1014-1026行: /* Produce an error for DEFS with FORMAT and ARGS. */ #include <stdarg.h> void line_error (DEF_FILE *defs, char *format, ...) { va_list list; if (defs->filename[0] != '/') fprintf (stderr, "%s", error_directory ? error_directory : "./"); fprintf (stderr, "%s:%d:", defs->filename, defs->line_number + 1); va_start(list, format); vfprintf (stderr, format, list); va_end(list); fprintf (stderr, "\n"); fflush (stderr); }
|
 |
/usr/bin/gcc -c -DHAVE_CONFIG_H -DSHELL -I. -I.. -I.. -I../include -I../lib -I. -I/home/oct1158/Documents/Code/C/luckfox-pico/sysdrv/source/buildroot/buildroot-2023.02.6/output/host/include -O2 -I/home/oct1158/Documents/Code/C/luckfox-pico/sysdrv/source/buildroot/buildroot-2023.02.6/output/host/include -DCROSS_COMPILING mkbuiltins.c mkbuiltins.c: In function 'main': mkbuiltins.c:232:1: warning: old-style function definition [-Wold-style-definition] 232 | main (argc, argv) | ^~~~ mkbuiltins.c:267:29: error: too many arguments to function 'xmalloc'; expected 0, have 1 267 | error_directory = xmalloc (2 + strlen (argv[arg_index])); | ^~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mkbuiltins.c:62:14: note: declared here 62 | static char *xmalloc (), *xrealloc (); | ^~~~~~~ mkbuiltins.c:307:34: error: too many arguments to function 'xmalloc'; expected 0, have 1 307 | temp_struct_filename = xmalloc (15); | ^~~~~~~ ~~ mkbuiltins.c:62:14: note: declared here 62 | static char *xmalloc (), *xrealloc (); | ^~~~~~~ mkbuiltins.c:312:13: error: too many arguments to function 'file_error'; expected 0, have 1 312 | file_error (temp_struct_filename); | ^~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~ mkbuiltins.c:206:6: note: declared here 206 | void file_error (); | ^~~~~~~~~~ mkbuiltins.c:320:13: error: too many arguments to function 'file_error'; expected 0, have 1 320 | file_error (extern_filename); | ^~~~~~~~~~ ~~~~~~~~~~~~~~~ mkbuiltins.c:206:6: note: declared here 206 | void file_error (); | ^~~~~~~~~~ mkbuiltins.c:324:7: error: too many arguments to function 'write_file_headers'; expected 0, have 2 324 | write_file_headers (structfile, externfile); | ^~~~~~~~~~~~~~~~~~ ~~~~~~~~~~ mkbuiltins.c:209:6: note: declared here 209 | void write_file_headers (); | ^~~~~~~~~~~~~~~~~~ mkbuiltins.c:341:7: error: too many arguments to function 'extract_info'; expected 0, have 3 341 | extract_info (arg, structfile, externfile); | ^~~~~~~~~~~~ ~~~ mkbuiltins.c:204:6: note: declared here 204 | void extract_info (); | ^~~~~~~~~~~~ mkbuiltins.c:348:7: error: too many arguments to function 'write_file_footers'; expected 0, have 2 348 | write_file_footers (structfile, externfile); | ^~~~~~~~~~~~~~~~~~ ~~~~~~~~~~ mkbuiltins.c:210:6: note: declared here 210 | void write_file_footers (); | ^~~~~~~~~~~~~~~~~~ mkbuiltins.c:352:11: error: too many arguments to function 'write_longdocs'; expected 0, have 2 352 | write_longdocs (structfile, saved_builtins); | ^~~~~~~~~~~~~~ ~~~~~~~~~~ mkbuiltins.c:214:6: note: declared here 214 | void write_longdocs (); | ^~~~~~~~~~~~~~ mkbuiltins.c: In function 'array_create': mkbuiltins.c:387:1: warning: old-style function definition [-Wold-style-definition] 387 | array_create (width) | ^~~~~~~~~~~~ mkbuiltins.c:392:20: error: too many arguments to function 'xmalloc'; expected 0, have 1 392 | array = (ARRAY *)xmalloc (sizeof (ARRAY)); | ^~~~~~~ ~~~~~~~~~~~~~~ mkbuiltins.c:62:14: note: declared here 62 | static char *xmalloc (), *xrealloc (); | ^~~~~~~ mkbuiltins.c: In function 'copy_string_array': mkbuiltins.c:407:1: warning: old-style function definition [-Wold-style-definition] 407 | copy_string_array (array) | ^~~~~~~~~~~~~~~~~ mkbuiltins.c:422:26: error: too many arguments to function 'xmalloc'; expected 0, have 1 422 | copy->array = (char **)xmalloc ((1 + array->sindex) * sizeof (char *)); | ^~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mkbuiltins.c:62:14: note: declared here 62 | static char *xmalloc (), *xrealloc (); | ^~~~~~~ mkbuiltins.c:68:31: error: too many arguments to function 'xmalloc'; expected 0, have 1 68 | #define savestring(x) strcpy (xmalloc (1 + strlen (x)), (x)) | ^~~~~~~ ~~~~~~~~~~~~~~ mkbuiltins.c:425:22: note: in expansion of macro 'savestring' 425 | copy->array[i] = savestring (array->array[i]); | ^~~~~~~~~~ mkbuiltins.c:62:14: note: declared here 62 | static char *xmalloc (), *xrealloc (); | ^~~~~~~ mkbuiltins.c: In function 'array_add': mkbuiltins.c:434:1: warning: old-style function definition [-Wold-style-definition] 434 | array_add (element, array) | ^~~~~~~~~ mkbuiltins.c:439:29: error: too many arguments to function 'xrealloc'; expected 0, have 2 439 | array->array = (char **)xrealloc | ^~~~~~~~ 440 | (array->array, (array->size += array->growth_rate) * array->width); | ~~~~~~~~~~~~ mkbuiltins.c:62:27: note: declared here 62 | static char *xmalloc (), *xrealloc (); | ^~~~~~~~ mkbuiltins.c: In function 'array_free': mkbuiltins.c:448:1: warning: old-style function definition [-Wold-style-definition] 448 | array_free (array) | ^~~~~~~~~~ mkbuiltins.c: In function 'find_directive': mkbuiltins.c:497:1: warning: old-style function definition [-Wold-style-definition] 497 | find_directive (directive) | ^~~~~~~~~~~~~~ mkbuiltins.c: In function 'extract_info': mkbuiltins.c:527:1: warning: old-style function definition [-Wold-style-definition] 527 | extract_info (filename, structfile, externfile) | ^~~~~~~~~~~~ mkbuiltins.c:530:1: error: number of arguments doesn't match prototype 530 | { | ^ mkbuiltins.c:204:6: error: prototype declaration 204 | void extract_info (); | ^~~~~~~~~~~~ mkbuiltins.c:539:5: error: too many arguments to function 'file_error'; expected 0, have 1 539 | file_error (filename); | ^~~~~~~~~~ ~~~~~~~~ mkbuiltins.c:206:6: note: declared here 206 | void file_error (); | ^~~~~~~~~~ mkbuiltins.c:544:5: error: too many arguments to function 'file_error'; expected 0, have 1 544 | file_error (filename); | ^~~~~~~~~~ ~~~~~~~~ mkbuiltins.c:206:6: note: declared here 206 | void file_error (); | ^~~~~~~~~~ mkbuiltins.c:547:12: error: too many arguments to function 'xmalloc'; expected 0, have 1 547 | buffer = xmalloc (1 + file_size); | ^~~~~~~ ~~~~~~~~~~~~~ mkbuiltins.c:62:14: note: declared here 62 | static char *xmalloc (), *xrealloc (); | ^~~~~~~ mkbuiltins.c:550:5: error: too many arguments to function 'file_error'; expected 0, have 1 550 | file_error (filename); | ^~~~~~~~~~ ~~~~~~~~ mkbuiltins.c:206:6: note: declared here 206 | void file_error (); | ^~~~~~~~~~ mkbuiltins.c:566:22: error: too many arguments to function 'xmalloc'; expected 0, have 1 566 | defs = (DEF_FILE *)xmalloc (sizeof (DEF_FILE)); | ^~~~~~~ ~~~~~~~~~~~~~~~~~ mkbuiltins.c:62:14: note: declared here 62 | static char *xmalloc (), *xrealloc (); | ^~~~~~~ mkbuiltins.c:603:23: error: too many arguments to function 'xmalloc'; expected 0, have 1 603 | directive = xmalloc (j); | ^~~~~~~ ~ mkbuiltins.c:62:14: note: declared here 62 | static char *xmalloc (), *xrealloc (); | ^~~~~~~ mkbuiltins.c:612:15: error: too many arguments to function 'line_error'; expected 0, have 3 612 | line_error (defs, "Unknown directive `%s'", directive); | ^~~~~~~~~~ ~~~~ mkbuiltins.c:207:6: note: declared here 207 | void line_error (); | ^~~~~~~~~~ mkbuiltins.c:630:13: error: too many arguments to function 'add_documentation'; expected 0, have 2 630 | add_documentation (defs, line); | ^~~~~~~~~~~~~~~~~ ~~~~ mkbuiltins.c:220:6: note: declared here 220 | void add_documentation (); | ^~~~~~~~~~~~~~~~~ mkbuiltins.c:660:3: error: too many arguments to function 'write_builtins'; expected 0, have 3 660 | write_builtins (defs, structfile, externfile); | ^~~~~~~~~~~~~~ ~~~~ mkbuiltins.c:215:6: note: declared here 215 | void write_builtins (); | ^~~~~~~~~~~~~~ mkbuiltins.c:663:3: error: too many arguments to function 'free_defs'; expected 0, have 1 663 | free_defs (defs); | ^~~~~~~~~ ~~~~ mkbuiltins.c:219:6: note: declared here 219 | void free_defs (); | ^~~~~~~~~ mkbuiltins.c: In function 'free_builtin': mkbuiltins.c:669:1: warning: old-style function definition [-Wold-style-definition] 669 | free_builtin (builtin) | ^~~~~~~~~~~~ mkbuiltins.c: In function 'free_defs': mkbuiltins.c:692:1: warning: old-style function definition [-Wold-style-definition] 692 | free_defs (defs) | ^~~~~~~~~ mkbuiltins.c:694:1: error: number of arguments doesn't match prototype 694 | { | ^ mkbuiltins.c:219:6: error: prototype declaration 219 | void free_defs (); | ^~~~~~~~~ mkbuiltins.c: In function 'strip_whitespace': mkbuiltins.c:725:1: warning: old-style function definition [-Wold-style-definition] 725 | strip_whitespace (string) | ^~~~~~~~~~~~~~~~ mkbuiltins.c:731:3: error: too many arguments to function 'remove_trailing_whitespace'; expected 0, have 1 731 | remove_trailing_whitespace (string); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~ mkbuiltins.c:223:6: note: declared here 223 | void remove_trailing_whitespace (); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ mkbuiltins.c: In function 'remove_trailing_whitespace': mkbuiltins.c:737:1: warning: old-style function definition [-Wold-style-definition] 737 | remove_trailing_whitespace (string) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ mkbuiltins.c:739:1: error: number of arguments doesn't match prototype 739 | { | ^ mkbuiltins.c:223:6: error: prototype declaration 223 | void remove_trailing_whitespace (); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ mkbuiltins.c: In function 'get_arg': mkbuiltins.c:755:1: warning: old-style function definition [-Wold-style-definition] 755 | get_arg (for_whom, defs, string) | ^~~~~~~ mkbuiltins.c:764:5: error: too many arguments to function 'line_error'; expected 0, have 3 764 | line_error (defs, "%s requires an argument", for_whom); | ^~~~~~~~~~ ~~~~ mkbuiltins.c:207:6: note: declared here 207 | void line_error (); | ^~~~~~~~~~ mkbuiltins.c:68:31: error: too many arguments to function 'xmalloc'; expected 0, have 1 68 | #define savestring(x) strcpy (xmalloc (1 + strlen (x)), (x)) | ^~~~~~~ ~~~~~~~~~~~~~~ mkbuiltins.c:766:11: note: in expansion of macro 'savestring' 766 | return (savestring (new)); | ^~~~~~~~~~ mkbuiltins.c:62:14: note: declared here 62 | static char *xmalloc (), *xrealloc (); | ^~~~~~~ mkbuiltins.c: In function 'must_be_building': mkbuiltins.c:771:1: warning: old-style function definition [-Wold-style-definition] 771 | must_be_building (directive, defs) | ^~~~~~~~~~~~~~~~ mkbuiltins.c:774:1: error: number of arguments doesn't match prototype 774 | { | ^ mkbuiltins.c:222:6: error: prototype declaration 222 | void must_be_building (); | ^~~~~~~~~~~~~~~~ mkbuiltins.c:776:5: error: too many arguments to function 'line_error'; expected 0, have 3 776 | line_error (defs, "%s must be inside of a $BUILTIN block", directive); | ^~~~~~~~~~ ~~~~ mkbuiltins.c:207:6: note: declared here 207 | void line_error (); | ^~~~~~~~~~ mkbuiltins.c: In function 'current_builtin': mkbuiltins.c:781:1: warning: old-style function definition [-Wold-style-definition] 781 | current_builtin (directive, defs) | ^~~~~~~~~~~~~~~ mkbuiltins.c:785:3: error: too many arguments to function 'must_be_building'; expected 0, have 2 785 | must_be_building (directive, defs); | ^~~~~~~~~~~~~~~~ ~~~~~~~~~ mkbuiltins.c:771:1: note: declared here 771 | must_be_building (directive, defs) | ^~~~~~~~~~~~~~~~ mkbuiltins.c: In function 'add_documentation': mkbuiltins.c:795:1: warning: old-style function definition [-Wold-style-definition] 795 | add_documentation (defs, line) | ^~~~~~~~~~~~~~~~~ mkbuiltins.c:798:1: error: number of arguments doesn't match prototype 798 | { | ^ mkbuiltins.c:220:6: error: prototype declaration 220 | void add_documentation (); | ^~~~~~~~~~~~~~~~~ mkbuiltins.c:803:3: error: too many arguments to function 'remove_trailing_whitespace'; expected 0, have 1 803 | remove_trailing_whitespace (line); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~ mkbuiltins.c:737:1: note: declared here 737 | remove_trailing_whitespace (string) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ mkbuiltins.c: In function 'builtin_handler': mkbuiltins.c:816:1: warning: old-style function definition [-Wold-style-definition] 816 | builtin_handler (self, defs, arg) | ^~~~~~~~~~~~~~~ mkbuiltins.c:827:7: error: too many arguments to function 'line_error'; expected 0, have 3 827 | line_error (defs, "%s found before $END", self); | ^~~~~~~~~~ ~~~~ mkbuiltins.c:207:6: note: declared here 207 | void line_error (); | ^~~~~~~~~~ mkbuiltins.c:840:25: error: too many arguments to function 'xmalloc'; expected 0, have 1 840 | new = (BUILTIN_DESC *)xmalloc (sizeof (BUILTIN_DESC)); | ^~~~~~~ ~~~~~~~~~~~~~~~~~~~~~ mkbuiltins.c:62:14: note: declared here 62 | static char *xmalloc (), *xrealloc (); | ^~~~~~~ mkbuiltins.c:849:7: error: too many arguments to function 'is_special_builtin'; expected 0, have 1 849 | if (is_special_builtin (name)) | ^~~~~~~~~~~~~~~~~~ ~~~~ mkbuiltins.c:194:12: note: declared here 194 | static int is_special_builtin (); | ^~~~~~~~~~~~~~~~~~ mkbuiltins.c:851:7: error: too many arguments to function 'is_assignment_builtin'; expected 0, have 1 851 | if (is_assignment_builtin (name)) | ^~~~~~~~~~~~~~~~~~~~~ ~~~~ mkbuiltins.c:195:12: note: declared here 195 | static int is_assignment_builtin (); | ^~~~~~~~~~~~~~~~~~~~~ mkbuiltins.c:853:7: error: too many arguments to function 'is_localvar_builtin'; expected 0, have 1 853 | if (is_localvar_builtin (name)) | ^~~~~~~~~~~~~~~~~~~ ~~~~ mkbuiltins.c:196:12: note: declared here 196 | static int is_localvar_builtin (); | ^~~~~~~~~~~~~~~~~~~ mkbuiltins.c:855:7: error: too many arguments to function 'is_posix_builtin'; expected 0, have 1 855 | if (is_posix_builtin (name)) | ^~~~~~~~~~~~~~~~ ~~~~ mkbuiltins.c:197:12: note: declared here 197 | static int is_posix_builtin (); | ^~~~~~~~~~~~~~~~ mkbuiltins.c:857:7: error: too many arguments to function 'is_arrayvar_builtin'; expected 0, have 1 857 | if (is_arrayvar_builtin (name)) | ^~~~~~~~~~~~~~~~~~~ ~~~~ mkbuiltins.c:198:12: note: declared here 198 | static int is_arrayvar_builtin (); | ^~~~~~~~~~~~~~~~~~~ mkbuiltins.c: In function 'function_handler': mkbuiltins.c:868:1: warning: old-style function definition [-Wold-style-definition] 868 | function_handler (self, defs, arg) | ^~~~~~~~~~~~~~~~ mkbuiltins.c:879:7: error: too many arguments to function 'line_error'; expected 0, have 2 879 | line_error (defs, "syntax error: no current builtin for $FUNCTION directive"); | ^~~~~~~~~~ ~~~~ mkbuiltins.c:207:6: note: declared here 207 | void line_error (); | ^~~~~~~~~~ mkbuiltins.c:883:5: error: too many arguments to function 'line_error'; expected 0, have 4 883 | line_error (defs, "%s already has a function (%s)", | ^~~~~~~~~~ ~~~~ mkbuiltins.c:207:6: note: declared here 207 | void line_error (); | ^~~~~~~~~~ mkbuiltins.c: In function 'docname_handler': mkbuiltins.c:893:1: warning: old-style function definition [-Wold-style-definition] 893 | docname_handler (self, defs, arg) | ^~~~~~~~~~~~~~~ mkbuiltins.c:903:5: error: too many arguments to function 'line_error'; expected 0, have 4 903 | line_error (defs, "%s already had a docname (%s)", | ^~~~~~~~~~ ~~~~ mkbuiltins.c:207:6: note: declared here 207 | void line_error (); | ^~~~~~~~~~ mkbuiltins.c: In function 'short_doc_handler': mkbuiltins.c:913:1: warning: old-style function definition [-Wold-style-definition] 913 | short_doc_handler (self, defs, arg) | ^~~~~~~~~~~~~~~~~ mkbuiltins.c:923:5: error: too many arguments to function 'line_error'; expected 0, have 4 923 | line_error (defs, "%s already has short documentation (%s)", | ^~~~~~~~~~ ~~~~ mkbuiltins.c:207:6: note: declared here 207 | void line_error (); | ^~~~~~~~~~ mkbuiltins.c: In function 'comment_handler': mkbuiltins.c:933:1: warning: old-style function definition [-Wold-style-definition] 933 | comment_handler (self, defs, arg) | ^~~~~~~~~~~~~~~ mkbuiltins.c: In function 'depends_on_handler': mkbuiltins.c:943:1: warning: old-style function definition [-Wold-style-definition] 943 | depends_on_handler (self, defs, arg) | ^~~~~~~~~~~~~~~~~~ mkbuiltins.c: In function 'produces_handler': mkbuiltins.c:964:1: warning: old-style function definition [-Wold-style-definition] 964 | produces_handler (self, defs, arg) | ^~~~~~~~~~~~~~~~ mkbuiltins.c:977:5: error: too many arguments to function 'line_error'; expected 0, have 4 977 | line_error (defs, "%s already has a %s definition", defs->filename, self); | ^~~~~~~~~~ ~~~~ mkbuiltins.c:207:6: note: declared here 207 | void line_error (); | ^~~~~~~~~~ mkbuiltins.c:988:9: error: too many arguments to function 'file_error'; expected 0, have 1 988 | file_error (defs->production); | ^~~~~~~~~~ ~~~~~~~~~~~~~~~~ mkbuiltins.c:206:6: note: declared here 206 | void file_error (); | ^~~~~~~~~~ mkbuiltins.c: In function 'end_handler': mkbuiltins.c:998:1: warning: old-style function definition [-Wold-style-definition] 998 | end_handler (self, defs, arg) | ^~~~~~~~~~~ mkbuiltins.c:1003:3: error: too many arguments to function 'must_be_building'; expected 0, have 2 1003 | must_be_building (self, defs); | ^~~~~~~~~~~~~~~~ ~~~~ mkbuiltins.c:771:1: note: declared here 771 | must_be_building (directive, defs) | ^~~~~~~~~~~~~~~~ mkbuiltins.c: In function 'line_error': mkbuiltins.c:1016:1: warning: old-style function definition [-Wold-style-definition] 1016 | line_error (defs, format, arg1, arg2) | ^~~~~~~~~~ mkbuiltins.c:1019:1: error: number of arguments doesn't match prototype 1019 | { | ^ mkbuiltins.c:207:6: error: prototype declaration 207 | void line_error (); | ^~~~~~~~~~ mkbuiltins.c: In function 'file_error': mkbuiltins.c:1030:1: warning: old-style function definition [-Wold-style-definition] 1030 | file_error (filename) | ^~~~~~~~~~ mkbuiltins.c:1032:1: error: number of arguments doesn't match prototype 1032 | { | ^ mkbuiltins.c:206:6: error: prototype declaration 206 | void file_error (); | ^~~~~~~~~~ mkbuiltins.c: In function 'xmalloc': mkbuiltins.c:1046:1: warning: old-style function definition [-Wold-style-definition] 1046 | xmalloc (bytes) | ^~~~~~~ mkbuiltins.c: In function 'xrealloc': mkbuiltins.c:1057:1: warning: old-style function definition [-Wold-style-definition] 1057 | xrealloc (pointer, bytes) | ^~~~~~~~ mkbuiltins.c: In function 'copy_builtin': mkbuiltins.c:1090:1: warning: old-style function definition [-Wold-style-definition] 1090 | copy_builtin (builtin) | ^~~~~~~~~~~~ mkbuiltins.c:1095:25: error: too many arguments to function 'xmalloc'; expected 0, have 1 1095 | new = (BUILTIN_DESC *)xmalloc (sizeof (BUILTIN_DESC)); | ^~~~~~~ ~~~~~~~~~~~~~~~~~~~~~ mkbuiltins.c:1046:1: note: declared here 1046 | xmalloc (bytes) | ^~~~~~~ mkbuiltins.c:68:31: error: too many arguments to function 'xmalloc'; expected 0, have 1 68 | #define savestring(x) strcpy (xmalloc (1 + strlen (x)), (x)) | ^~~~~~~ ~~~~~~~~~~~~~~ mkbuiltins.c:1097:15: note: in expansion of macro 'savestring' 1097 | new->name = savestring (builtin->name); | ^~~~~~~~~~ mkbuiltins.c:1046:1: note: declared here 1046 | xmalloc (bytes) | ^~~~~~~ mkbuiltins.c:68:31: error: too many arguments to function 'xmalloc'; expected 0, have 1 68 | #define savestring(x) strcpy (xmalloc (1 + strlen (x)), (x)) | ^~~~~~~ ~~~~~~~~~~~~~~ mkbuiltins.c:1098:19: note: in expansion of macro 'savestring' 1098 | new->shortdoc = savestring (builtin->shortdoc); | ^~~~~~~~~~ mkbuiltins.c:1046:1: note: declared here 1046 | xmalloc (bytes) | ^~~~~~~ mkbuiltins.c:68:31: error: too many arguments to function 'xmalloc'; expected 0, have 1 68 | #define savestring(x) strcpy (xmalloc (1 + strlen (x)), (x)) | ^~~~~~~ ~~~~~~~~~~~~~~ mkbuiltins.c:1103:25: note: in expansion of macro 'savestring' 1103 | builtin->function ? savestring (builtin->function) : (char *)NULL; | ^~~~~~~~~~ mkbuiltins.c:1046:1: note: declared here 1046 | xmalloc (bytes) | ^~~~~~~ mkbuiltins.c:68:31: error: too many arguments to function 'xmalloc'; expected 0, have 1 68 | #define savestring(x) strcpy (xmalloc (1 + strlen (x)), (x)) | ^~~~~~~ ~~~~~~~~~~~~~~ mkbuiltins.c:1105:25: note: in expansion of macro 'savestring' 1105 | builtin->docname ? savestring (builtin->docname) : (char *)NULL; | ^~~~~~~~~~ mkbuiltins.c:1046:1: note: declared here 1046 | xmalloc (bytes) | ^~~~~~~ mkbuiltins.c: In function 'save_builtin': mkbuiltins.c:1112:1: warning: old-style function definition [-Wold-style-definition] 1112 | save_builtin (builtin) | ^~~~~~~~~~~~ mkbuiltins.c: In function 'write_file_headers': mkbuiltins.c:1190:1: warning: old-style function definition [-Wold-style-definition] 1190 | write_file_headers (structfile, externfile) | ^~~~~~~~~~~~~~~~~~ mkbuiltins.c:1192:1: error: number of arguments doesn't match prototype 1192 | { | ^ mkbuiltins.c:209:6: error: prototype declaration 209 | void write_file_headers (); | ^~~~~~~~~~~~~~~~~~ mkbuiltins.c: In function 'write_file_footers': mkbuiltins.c:1217:1: warning: old-style function definition [-Wold-style-definition] 1217 | write_file_footers (structfile, externfile) | ^~~~~~~~~~~~~~~~~~ mkbuiltins.c:1219:1: error: number of arguments doesn't match prototype 1219 | { | ^ mkbuiltins.c:210:6: error: prototype declaration 210 | void write_file_footers (); | ^~~~~~~~~~~~~~~~~~ mkbuiltins.c: In function 'write_builtins': mkbuiltins.c:1233:1: warning: old-style function definition [-Wold-style-definition] 1233 | write_builtins (defs, structfile, externfile) | ^~~~~~~~~~~~~~ mkbuiltins.c:1236:1: error: number of arguments doesn't match prototype 1236 | { | ^ mkbuiltins.c:215:6: error: prototype declaration 215 | void write_builtins (); | ^~~~~~~~~~~~~~ mkbuiltins.c:1253:19: error: too many arguments to function 'write_ifdefs'; expected 0, have 2 1253 | write_ifdefs (externfile, builtin->dependencies->array); | ^~~~~~~~~~~~ ~~~~~~~~~~ mkbuiltins.c:211:6: note: declared here 211 | void write_ifdefs (); | ^~~~~~~~~~~~ mkbuiltins.c:1254:19: error: too many arguments to function 'write_ifdefs'; expected 0, have 2 1254 | write_ifdefs (structfile, builtin->dependencies->array); | ^~~~~~~~~~~~ ~~~~~~~~~~ mkbuiltins.c:211:6: note: declared here 211 | void write_ifdefs (); | ^~~~~~~~~~~~ mkbuiltins.c:1320:21: error: too many arguments to function 'write_endifs'; expected 0, have 2 1320 | write_endifs (externfile, builtin->dependencies->array); | ^~~~~~~~~~~~ ~~~~~~~~~~ mkbuiltins.c:212:6: note: declared here 212 | void write_endifs (); | ^~~~~~~~~~~~ mkbuiltins.c:1323:21: error: too many arguments to function 'write_endifs'; expected 0, have 2 1323 | write_endifs (structfile, builtin->dependencies->array); | ^~~~~~~~~~~~ ~~~~~~~~~~ mkbuiltins.c:212:6: note: declared here 212 | void write_endifs (); | ^~~~~~~~~~~~ mkbuiltins.c:1330:15: error: too many arguments to function 'write_documentation'; expected 0, have 4 1330 | write_documentation | ^~~~~~~~~~~~~~~~~~~ 1331 | (documentation_file, builtin->longdoc->array, 0, TEXINFO); | ~~~~~~~~~~~~~~~~~~ mkbuiltins.c:213:6: note: declared here 213 | void write_documentation (); | ^~~~~~~~~~~~~~~~~~~ mkbuiltins.c: In function 'write_longdocs': mkbuiltins.c:1339:1: warning: old-style function definition [-Wold-style-definition] 1339 | write_longdocs (stream, builtins) | ^~~~~~~~~~~~~~ mkbuiltins.c:1342:1: error: number of arguments doesn't match prototype 1342 | { | ^ mkbuiltins.c:214:6: error: prototype declaration 214 | void write_longdocs (); | ^~~~~~~~~~~~~~ mkbuiltins.c:1353:9: error: too many arguments to function 'write_ifdefs'; expected 0, have 2 1353 | write_ifdefs (stream, builtin->dependencies->array); | ^~~~~~~~~~~~ ~~~~~~ mkbuiltins.c:211:6: note: declared here 211 | void write_ifdefs (); | ^~~~~~~~~~~~ mkbuiltins.c:1362:31: error: too many arguments to function 'xmalloc'; expected 0, have 1 1362 | sarray[0] = (char *)xmalloc (l + 1); | ^~~~~~~ ~~~~~ mkbuiltins.c:1046:1: note: declared here 1046 | xmalloc (bytes) | ^~~~~~~ mkbuiltins.c:1365:11: error: too many arguments to function 'write_documentation'; expected 0, have 4 1365 | write_documentation (stream, sarray, 0, STRING_ARRAY|HELPFILE); | ^~~~~~~~~~~~~~~~~~~ ~~~~~~ mkbuiltins.c:213:6: note: declared here 213 | void write_documentation (); | ^~~~~~~~~~~~~~~~~~~ mkbuiltins.c:1369:9: error: too many arguments to function 'write_documentation'; expected 0, have 4 1369 | write_documentation (stream, builtin->longdoc->array, 0, STRING_ARRAY); | ^~~~~~~~~~~~~~~~~~~ ~~~~~~ mkbuiltins.c:213:6: note: declared here 213 | void write_documentation (); | ^~~~~~~~~~~~~~~~~~~ mkbuiltins.c:1372:9: error: too many arguments to function 'write_endifs'; expected 0, have 2 1372 | write_endifs (stream, builtin->dependencies->array); | ^~~~~~~~~~~~ ~~~~~~ mkbuiltins.c:212:6: note: declared here 212 | void write_endifs (); | ^~~~~~~~~~~~ mkbuiltins.c: In function 'write_dummy_declarations': mkbuiltins.c:1378:1: warning: old-style function definition [-Wold-style-definition] 1378 | write_dummy_declarations (stream, builtins) | ^~~~~~~~~~~~~~~~~~~~~~~~ mkbuiltins.c: In function 'write_ifdefs': mkbuiltins.c:1404:1: warning: old-style function definition [-Wold-style-definition] 1404 | write_ifdefs (stream, defines) | ^~~~~~~~~~~~ mkbuiltins.c:1407:1: error: number of arguments doesn't match prototype 1407 | { | ^ mkbuiltins.c:211:6: error: prototype declaration 211 | void write_ifdefs (); | ^~~~~~~~~~~~ mkbuiltins.c: In function 'write_endifs': mkbuiltins.c:1435:1: warning: old-style function definition [-Wold-style-definition] 1435 | write_endifs (stream, defines) | ^~~~~~~~~~~~ mkbuiltins.c:1438:1: error: number of arguments doesn't match prototype 1438 | { | ^ mkbuiltins.c:212:6: error: prototype declaration 212 | void write_endifs (); | ^~~~~~~~~~~~ mkbuiltins.c: In function 'write_documentation': mkbuiltins.c:1462:1: warning: old-style function definition [-Wold-style-definition] 1462 | write_documentation (stream, documentation, indentation, flags) | ^~~~~~~~~~~~~~~~~~~ mkbuiltins.c:1466:1: error: number of arguments doesn't match prototype 1466 | { | ^ mkbuiltins.c:213:6: error: prototype declaration 213 | void write_documentation (); | ^~~~~~~~~~~~~~~~~~~ mkbuiltins.c: In function 'write_helpfiles': mkbuiltins.c:1593:1: warning: old-style function definition [-Wold-style-definition] 1593 | write_helpfiles (builtins) | ^~~~~~~~~~~~~~~ mkbuiltins.c:1595:1: error: number of arguments doesn't match prototype 1595 | { | ^ mkbuiltins.c:217:5: error: prototype declaration 217 | int write_helpfiles (); | ^~~~~~~~~~~~~~~ mkbuiltins.c:1614:26: error: too many arguments to function 'xmalloc'; expected 0, have 1 1614 | helpfile = (char *)xmalloc (hdlen + strlen (bname) + 1); | ^~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~ mkbuiltins.c:1046:1: note: declared here 1046 | xmalloc (bytes) | ^~~~~~~ mkbuiltins.c:1625:7: error: too many arguments to function 'write_documentation'; expected 0, have 4 1625 | write_documentation (helpfp, builtin->longdoc->array, 4, PLAINTEXT); | ^~~~~~~~~~~~~~~~~~~ ~~~~~~ mkbuiltins.c:1462:1: note: declared here 1462 | write_documentation (stream, documentation, indentation, flags) | ^~~~~~~~~~~~~~~~~~~ mkbuiltins.c: In function '_find_in_table': mkbuiltins.c:1635:1: warning: old-style function definition [-Wold-style-definition] 1635 | _find_in_table (name, name_table) | ^~~~~~~~~~~~~~ mkbuiltins.c: In function 'is_special_builtin': mkbuiltins.c:1647:1: warning: old-style function definition [-Wold-style-definition] 1647 | is_special_builtin (name) | ^~~~~~~~~~~~~~~~~~ mkbuiltins.c: In function 'is_assignment_builtin': mkbuiltins.c:1654:1: warning: old-style function definition [-Wold-style-definition] 1654 | is_assignment_builtin (name) | ^~~~~~~~~~~~~~~~~~~~~ mkbuiltins.c: In function 'is_localvar_builtin': mkbuiltins.c:1661:1: warning: old-style function definition [-Wold-style-definition] 1661 | is_localvar_builtin (name) | ^~~~~~~~~~~~~~~~~~~ mkbuiltins.c: In function 'is_posix_builtin': mkbuiltins.c:1668:1: warning: old-style function definition [-Wold-style-definition] 1668 | is_posix_builtin (name) | ^~~~~~~~~~~~~~~~ mkbuiltins.c: In function 'is_arrayvar_builtin': mkbuiltins.c:1675:1: warning: old-style function definition [-Wold-style-definition] 1675 | is_arrayvar_builtin (name) | ^~~~~~~~~~~~~~~~~~~ make[3]: *** [Makefile:223: mkbuiltins.o] Error 1 make[3]: Leaving directory '/home/oct1158/Documents/Code/C/luckfox-pico/sysdrv/source/buildroot/buildroot-2023.02.6/output/build/bash-5.2.15/builtins' make[2]: *** [Makefile:762: builtins/builtext.h] Error 1 make[2]: Leaving directory '/home/oct1158/Documents/Code/C/luckfox-pico/sysdrv/source/buildroot/buildroot-2023.02.6/output/build/bash-5.2.15' make[1]: *** [package/pkg-generic.mk:293: /home/oct1158/Documents/Code/C/luckfox-pico/sysdrv/source/buildroot/buildroot-2023.02.6/output/build/bash-5.2.15/.stamp_built] Error 2 make[1]: Leaving directory '/home/oct1158/Documents/Code/C/luckfox-pico/sysdrv/source/buildroot/buildroot-2023.02.6' make: *** [Makefile:618: buildroot] Error 2 make: Leaving directory '/home/oct1158/Documents/Code/C/luckfox-pico/sysdrv' [build.sh:error] Running build_rootfs failed! [build.sh:error] exit code 2 from line 858: [build.sh:info] make rootfs -C ${SDK_SYSDRV_DIR} [oct1158@fed41-bh8f7e0 luckfox-pico]$
|