fix compiler warnings (#17)

This commit is contained in:
Philipp Moritz
2016-09-10 17:47:37 -07:00
committed by Robert Nishihara
parent d52bf7d146
commit 494903c5d4
8 changed files with 9 additions and 6 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ else
base_commit="$TRAVIS_BRANCH"
echo "Running clang-format against branch $base_commit, with hash $(git rev-parse $base_commit)"
fi
output="$(.travis/git-clang-format --binary clang-format-3.8 --commit $base_commit --diff --exclude ^third_party/)"
output="$(.travis/git-clang-format --binary clang-format-3.8 --commit $base_commit --diff --exclude ^thirdparty/)"
if [ "$output" == "no modified files to format" ] || [ "$output" == "clang-format did not modify any files" ] ; then
echo "clang-format passed."
exit 0
+2 -2
View File
@@ -1,5 +1,5 @@
CC = gcc
CFLAGS = -g -Wall --std=c99 -D_XOPEN_SOURCE=500 -I.
CFLAGS = -g -Wall --std=c99 -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=200809L -I.
BUILD = build
all: $(BUILD)/plasma_store $(BUILD)/plasma_manager $(BUILD)/plasma_client.so $(BUILD)/example
@@ -7,7 +7,7 @@ all: $(BUILD)/plasma_store $(BUILD)/plasma_manager $(BUILD)/plasma_client.so $(B
clean:
rm -r $(BUILD)/*
$(BUILD)/plasma_store: src/plasma_store.c src/plasma.h src/event_loop.h src/event_loop.c src/fling.h src/fling.c src/malloc.c src/malloc.h third_party/dlmalloc.c
$(BUILD)/plasma_store: src/plasma_store.c src/plasma.h src/event_loop.h src/event_loop.c src/fling.h src/fling.c src/malloc.c src/malloc.h thirdparty/dlmalloc.c
$(CC) $(CFLAGS) src/plasma_store.c src/event_loop.c src/fling.c src/malloc.c -o $(BUILD)/plasma_store
$(BUILD)/plasma_manager: src/plasma_manager.c src/event_loop.h src/event_loop.c src/plasma.h src/plasma_client.c src/fling.h src/fling.c
+1
View File
@@ -2,6 +2,7 @@
#define EVENT_LOOP_H
#include <poll.h>
#include <string.h>
#include "utarray.h"
#include "plasma.h"
+2
View File
@@ -1,5 +1,7 @@
#include "fling.h"
#include <string.h>
void init_msg(struct msghdr *msg,
struct iovec *iov,
char *buf,
+1 -1
View File
@@ -19,7 +19,7 @@ int fake_munmap(void *, size_t);
#define USE_DL_PREFIX
#define HAVE_MORECORE 0
#include "third_party/dlmalloc.c"
#include "thirdparty/dlmalloc.c"
#undef MMAP
#undef MUNMAP
+1 -1
View File
@@ -116,7 +116,7 @@ int plasma_manager_connect(const char *ip_addr, int port) {
struct sockaddr_in addr;
addr.sin_family = AF_INET;
bcopy(manager->h_addr, &addr.sin_addr.s_addr, manager->h_length);
memcpy(&addr.sin_addr.s_addr, manager->h_addr, manager->h_length);
addr.sin_port = htons(port);
int r = connect(fd, (struct sockaddr *) &addr, sizeof(addr));
+1 -1
View File
@@ -49,7 +49,7 @@ void initiate_transfer(plasma_manager_state* s, plasma_request* req) {
plasma_buffer buf = {.object_id = req->object_id, .writable = 0};
plasma_get(store_conn, req->object_id, &buf.size, &buf.data);
char ip_addr[16];
char ip_addr[32];
snprintf(ip_addr, 32, "%d.%d.%d.%d", req->addr[0], req->addr[1], req->addr[2],
req->addr[3]);
View File