Esempio n. 1
0
static int
checkfunc(void *ptr, void *arg)
{
    Symbol *s = ptr;
    if (s->stype == SUndefined) {
	lex_error_message("%s is still undefined\n", s->name);
	*(int *) arg = 1;
    }
    return 0;
}
Esempio n. 2
0
static int
checkfunc(void *ptr, void *arg)
{
    Symbol *s = ptr;
    if (s->stype == SUndefined) {
	lex_error_message("%s is still undefined\n", s->name);
	*(int *) arg = 1;
    }

    if (!s->flags.used) {
	if (s->flags.external) {
	    lex_error_message("external symbol %s is no used\n", s->name);
	    *(int *) arg = 1;
	} else if (s->stype == Stype && !is_export(s->name)) {
	    lex_error_message("%s is still unused (not referenced internally or exported)\n", s->name);
	    *(int *) arg = 1;
	}
    }

    return 0;
}