diff --git a/lib/modules/Tools.pmod/Standalone.pmod/precompile.pike b/lib/modules/Tools.pmod/Standalone.pmod/precompile.pike index 066d6e03b7d755618ae989f3bd254dd0923fb3f7..b97eaf28866e4af888e348d579d1d1c119de960d 100644 --- a/lib/modules/Tools.pmod/Standalone.pmod/precompile.pike +++ b/lib/modules/Tools.pmod/Standalone.pmod/precompile.pike @@ -2278,10 +2278,11 @@ static struct %s *%s_gdb_dummy_ptr; min_args--; foreach(args, Argument arg) - ret+=({ - PC.Token(sprintf("%s %s;\n",arg->c_type(), arg->name()), - arg->line()), - }); + if( arg->name() != "UNUSED" ) + ret+=({ + PC.Token(sprintf("%s %s;\n",arg->c_type(), arg->name()), + arg->line()), + }); int argnum; @@ -2329,7 +2330,13 @@ static struct %s *%s_gdb_dummy_ptr; foreach(args, Argument arg) { int got_void_or_zero_check = 0; - + if( arg->name() == "UNUSED" ) + { + // simply skip directly for now. + // should probably also handle ... etc? + argnum++; + continue; + } if (argnum == repeat_arg) { // Begin the argcnt loop. check_argbase = "+argcnt"+argbase;