Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,13 @@ elif GetOption('asan'):

env = Environment(
ENV=os.environ,
CC='clang',
CXX='clang++',
CCFLAGS=[
"-g",
"-fPIC",
"-O2",
"-Wunused",
"-Werror",
"-Wshadow",
"-Wshadow" if arch == "Darwin" else "-Wshadow=local",
"-Wno-vla-cxx-extension",
"-Wno-unknown-warning-option",
] + ccflags,
Expand All @@ -78,7 +76,7 @@ Export('env', 'arch', 'common')

envCython = env.Clone(LIBS=[])
envCython["CPPPATH"] += [np.get_include()]
envCython["CCFLAGS"] += ["-Wno-#warnings", "-Wno-shadow", "-Wno-deprecated-declarations"]
envCython["CCFLAGS"] += ["-Wno-#warnings", "-Wno-cpp", "-Wno-shadow", "-Wno-deprecated-declarations"]
envCython["CCFLAGS"].remove('-Werror')
if arch == "Darwin":
envCython["LINKFLAGS"] = ["-bundle", "-undefined", "dynamic_lookup"]
Expand Down
3 changes: 2 additions & 1 deletion msgq/event.cc
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ int Event::clear() const {

uint64_t val = 0;
// read the eventfd to clear it
read(this->event_fd, &val, sizeof(uint64_t));
ssize_t ret = read(this->event_fd, &val, sizeof(uint64_t));
assert(ret == sizeof(uint64_t));

return val;
}
Expand Down
3 changes: 2 additions & 1 deletion msgq/visionipc/visionbuf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ static void *malloc_with_fd(size_t len, int *fd) {

unlink(full_path);

ftruncate(*fd, len);
int ret = ftruncate(*fd, len);
assert(ret == 0);
void *addr = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED, *fd, 0);
assert(addr != MAP_FAILED);

Expand Down
2 changes: 1 addition & 1 deletion msgq/visionipc/visionipc_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ static int connect_to_vipc_server(const std::string &name, bool blocking) {
return socket_fd;
}

VisionIpcClient::VisionIpcClient(std::string name, VisionStreamType type, bool conflate) : name(name), type(type) {
VisionIpcClient::VisionIpcClient(std::string name_, VisionStreamType type_, bool conflate) : name(name_), type(type_) {
msg_ctx = Context::create();
sock = SubSocket::create(msg_ctx, get_endpoint_name(name, type), "127.0.0.1", conflate, false);

Expand Down
2 changes: 1 addition & 1 deletion msgq/visionipc/visionipc_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ std::string get_ipc_path(const std::string& name) {
return path + "visionipc_" + name;
}

VisionIpcServer::VisionIpcServer(std::string name) : name(name) {
VisionIpcServer::VisionIpcServer(std::string name_) : name(name_) {
msg_ctx = Context::create();

std::random_device rd("/dev/urandom");
Expand Down
19 changes: 0 additions & 19 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,6 @@ cd $DIR

PLATFORM=$(uname -s)

echo "installing dependencies"
if [[ $PLATFORM == "Darwin" ]]; then
if ! command -v python3 &>/dev/null; then
export HOMEBREW_NO_AUTO_UPDATE=1
brew install python3
fi
elif [[ $PLATFORM == "Linux" ]]; then
# for AGNOS since we clear the apt lists
if [[ ! -d /"var/lib/apt/" ]]; then
sudo apt update
fi

sudo apt-get install -y --no-install-recommends \
curl ca-certificates \
python3-dev python3-pip python3-venv
else
echo "WARNING: unsupported platform. skipping apt/brew install."
fi

# catch2
if [ ! -d $DIR/msgq/catch2/ ]; then
rm -rf /tmp/catch2/ $DIR/msgq/catch2/
Expand Down