Commit 6e92a4c7 authored by Scott Vokes's avatar Scott Vokes
Browse files

Makefile and warning cleanup

parent 1d7ecd39
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -3,8 +3,8 @@ THREADPOOL_PATH= ../threadpool

OPT=		-O3
LIB_INC =	-I${SOCKET99_PATH} -I${THREADPOOL_PATH}
CFLAGS +=	-std=c99 ${OPT} -g ${LIB_INC}
LDFLAGS +=	-L. -lcasq -L${SOCKET99_PATH} -lsocket99 -L${THREADPOOL_PATH} -lthreadpool
CFLAGS +=	-std=c99 ${OPT} -Wall -g ${LIB_INC}
LDFLAGS +=	-L. -L${SOCKET99_PATH} -lsocket99 -L${THREADPOOL_PATH} -lthreadpool

BUS_OBJS = \
	bus.o \
@@ -29,7 +29,7 @@ test: test_casq test_yacht
libcasq.a: casq.o
	ar -rcs $@ $^

test_casq: libcasq.a test_casq.o
test_casq: libcasq.a test_casq.o casq.o
	${CC} -o $@ ${LDFLAGS} $^

test_yacht: test_yacht.o yacht.o
+0 −4
Original line number Diff line number Diff line
@@ -263,7 +263,6 @@ static void usage(void) {
}

static void parse_args(int argc, char **argv, example_state *s) {
    int i = 0;
    int a = 0;

    s->buf_size = DEFAULT_BUF_SIZE;
@@ -338,9 +337,6 @@ static size_t construct_msg(uint8_t *buf, size_t buf_size, size_t payload_size,
    assert(buf_size > header_size);
    prot_header_t *header = (prot_header_t *)buf;

    size_t rem = buf_size - header_size;
    const size_t start_fill = 8; /* start off with a couple bytes */

    uint8_t *payload = &buf[header_size];
    for (int i = 0; i < payload_size; i++) {
        payload[i] = (uint8_t)(0xFF & i);
+0 −2
Original line number Diff line number Diff line
@@ -97,7 +97,6 @@ static void usage(void) {
}

static void parse_args(int argc, char **argv, config *cfg) {
    int i = 0;
    int a = 0;
    
    while ((a = getopt(argc, argv, "l:h:v")) != -1) {
@@ -444,7 +443,6 @@ static void enqueue_write(config *cfg, int fd,
}

static void disconnect_client(config *cfg, int fd) {
    int client_index = 0;
    for (int i = 0; i < MAX_CLIENTS; i++) {
        if (cfg->client_fds[i].fd == fd) {
            LOG(3, "disconnecting client %d\n", fd);
+0 −2
Original line number Diff line number Diff line
@@ -167,8 +167,6 @@ bool listener_shutdown(struct listener *l) {
}

static void free_queue_cb(void *data, void *udata) {
    struct listener *l = (struct listener *)udata;

    listener_msg *msg = (listener_msg *)data;
    switch (msg->type) {
    case MSG_ADD_SOCKET:
+0 −1
Original line number Diff line number Diff line
@@ -99,7 +99,6 @@ bool sender_enqueue_message(struct sender *s,
    struct bus *b = s->bus;
    BUS_LOG(b, 6, LOG_SENDER, "get_free_tx_info", b->udata);
    tx_info_t *tx_info = get_free_tx_info(s);
    int dest_pipe = -1;

    if (tx_info == NULL) {  /* No messages left. */
        BUS_LOG(b, 3, LOG_SENDER, "enqueue: no messages left", b->udata);
Loading