Commit da48dfcb authored by Scott Vokes's avatar Scott Vokes
Browse files

Fix warnings.

parent 2d1d1ddf
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -367,7 +367,6 @@ static void set_error_for_socket(listener *l, int id, int fd, rx_error_t err) {
        }
        default:
        {
            struct bus *b = l->bus;
            BUS_LOG_SNPRINTF(b, 0, LOG_LISTENER, b->udata, 64,
                "match fail %d on line %d", info->state, __LINE__);
            assert(false);
@@ -1256,7 +1255,7 @@ static void expect_response(listener *l, struct boxed_msg *box) {
            info->timeout_sec = box->timeout_sec;
        }
    } else {                    /* use free info */
        rx_info_t *info = get_free_rx_info(l);
        info = get_free_rx_info(l);
        assert(info);
        assert(info->state == RIS_INACTIVE);
        BUS_LOG_SNPRINTF(b, 3, LOG_MEMORY, b->udata, 128,
+2 −1
Original line number Diff line number Diff line
@@ -237,7 +237,8 @@ bool KineticPDU_InitBus(KineticClient * client, KineticClientConfig * config)
            .max_threads = config->maxThreadpoolThreads,
        },
    };
    bus_result res = {0};
    bus_result res;
    memset(res, 0, sizeof(res));
    if (!bus_init(&cfg, &res)) {
        LOGF0("failed to init bus: %d\n", res.status);
        return false;
+5 −5
Original line number Diff line number Diff line
@@ -142,17 +142,17 @@ static void commit_current_task(struct threadpool *t, struct marked_task *task,
    }
}

void threadpool_stats(struct threadpool *t, struct threadpool_info *ti) {
    if (ti) {
void threadpool_stats(struct threadpool *t, struct threadpool_info *info) {
    if (info) {
        uint8_t at = 0;
        for (int i = 0; i < t->live_threads; i++) {
            struct thread_info *ti = &t->threads[i];
            if (ti->status == STATUS_AWAKE) { at++; }
        }
        ti->active_threads = at;
        info->active_threads = at;

        ti->dormant_threads = t->live_threads - at;
        ti->backlog_size = t->task_commit_head - t->task_request_head;
        info->dormant_threads = t->live_threads - at;
        info->backlog_size = t->task_commit_head - t->task_request_head;
    }
}