alpine 3.8
obsolete weakness #15

1

Weakness Breakdown


Definition:

An obsolete weakness occurs when someone uses deprecated or obsolete functions when building a system. As a programming language evolves, some functions occasionally become obsolete.

Warning code(s):

This C routine is considered obsolete.

File Name:

distcc/src/distcc-distcc-3.1/src/mon-text.c

Context:

The highlighted line of code below is the trigger point of this particular Alpine 3.8 obsolete weakness.

      * other program, so make sure we're always line buffered. */
    setvbuf (stdout, NULL, _IOLBF, BUFSIZ);

    do {
        struct dcc_task_state *i;

        if ((ret = dcc_mon_poll(&list)))
            return ret;

        for (i = list; i; i = i->next) {
#if 1
            if (i->curr_phase == DCC_PHASE_DONE)
                continue;
#endif
            /* Assume 80 cols = */
            printf("%6ld  %-10.10s  %-30.30s %24.24s[%d]\n",
                   (long) i->cpid,
                   dcc_get_phase_name(i->curr_phase),
                   i->file, i->host, i->slot);
        }

        printf("\n");

        /* XXX: usleep() is probably not very portable */
        usleep(delay * 1000000);

        dcc_task_state_free(list);
    } while (delay);

    return 0;
} 

The registered trademark Linux® is used pursuant to a sublicense from the Linux Foundation, the exclusive licensee of Linus Torvalds, owner of the mark on a world­wide basis.