diff --git a/lib/src/gretl_join.c b/lib/src/gretl_join.c index 8c992bdde..e82253668 100644 --- a/lib/src/gretl_join.c +++ b/lib/src/gretl_join.c @@ -941,8 +941,7 @@ static int binsearch (keynum targ, const keynum *vals, int n, int offset) not, return 0. */ -static int aggr_val_determined (joiner *jr, int n, int ntotal, - double *x, int *err) +static int aggr_val_determined (joiner *jr, int n, double *x, int *err) { if (jr->aggr == AGGR_COUNT) { /* just return the number of matches */ @@ -962,10 +961,6 @@ static int aggr_val_determined (joiner *jr, int n, int ntotal, "method for a 1:n join")); *x = NADBL; return 1; - } else if (ntotal == 0 && jr->aggr == AGGR_NONE) { - fprintf(stderr, "aggr_val_determined ? ntotal = 0\n"); - *x = NADBL; - return 1; } else { /* not enough information so far */ return 0; @@ -1049,7 +1044,7 @@ static double aggr_value (joiner *jr, if (jr->n_keys == 1) { /* if there's just a single key, we can figure some cases out already */ - if (aggr_val_determined(jr, n, -1, &x, err)) { + if (aggr_val_determined(jr, n, &x, err)) { return x; } } @@ -1153,7 +1148,7 @@ static double aggr_value (joiner *jr, return NADBL; } /* we've already checked this for the 1-key case */ - if (aggr_val_determined(jr, n, ntotal, &x, err)) { + if (aggr_val_determined(jr, n, &x, err)) { return x; } }