Skip to content

Instantly share code, notes, and snippets.

@jonm
Created October 3, 2015 22:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonm/3e0aef1badf12299f63f to your computer and use it in GitHub Desktop.
Save jonm/3e0aef1badf12299f63f to your computer and use it in GitHub Desktop.
malloc called with the wrong number of arguments
[~/src/SillyMUD/src]$ make
gcc -g -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -c -o db.o db.c
...
db.c:3229:107: error: too many arguments to function call, expected 1, have 2
script_data[top_of_scripts].script = (struct foo_data *) malloc(script_data[top_of_scripts].script, sizeof(struct foo_data));
~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~
...
94 warnings and 1 error generated.
make: *** [db.o] Error 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment