From 4dc3bc0020060335b8575c6e7ace28de6da9ab2d Mon Sep 17 00:00:00 2001 From: Christophe de Dinechin Date: Thu, 24 Sep 2020 13:50:13 +0200 Subject: [PATCH] rust-agent: Treat warnings as error Avoid the accumulation of warnings we had, as reported in #750. Fixes: #750 Signed-off-by: Christophe de Dinechin --- src/agent/Makefile | 4 ++-- src/trace-forwarder/Makefile | 2 +- tools/agent-ctl/Makefile | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/agent/Makefile b/src/agent/Makefile index b98b9510ef..8b97439e8f 100644 --- a/src/agent/Makefile +++ b/src/agent/Makefile @@ -106,10 +106,10 @@ default: $(TARGET) show-header $(TARGET): $(GENERATED_CODE) $(TARGET_PATH) $(TARGET_PATH): $(SOURCES) | show-summary - @cargo build --target $(TRIPLE) --$(BUILD_TYPE) + @RUSTFLAGS="--deny warnings" cargo build --target $(TRIPLE) --$(BUILD_TYPE) optimize: $(SOURCES) | show-summary show-header - @RUSTFLAGS='-C link-arg=-s' cargo build --target $(TRIPLE) --$(BUILD_TYPE) + @RUSTFLAGS='-C link-arg=-s --deny-warnings' cargo build --target $(TRIPLE) --$(BUILD_TYPE) show-header: @printf "%s - version %s (commit %s)\n\n" "$(TARGET)" "$(VERSION)" "$(COMMIT_MSG)" diff --git a/src/trace-forwarder/Makefile b/src/trace-forwarder/Makefile index e02aef3975..ae73325922 100644 --- a/src/trace-forwarder/Makefile +++ b/src/trace-forwarder/Makefile @@ -6,7 +6,7 @@ default: build build: - cargo build -v + RUSTFLAGS="--deny warnings" cargo build -v clean: cargo clean diff --git a/tools/agent-ctl/Makefile b/tools/agent-ctl/Makefile index e02aef3975..ae73325922 100644 --- a/tools/agent-ctl/Makefile +++ b/tools/agent-ctl/Makefile @@ -6,7 +6,7 @@ default: build build: - cargo build -v + RUSTFLAGS="--deny warnings" cargo build -v clean: cargo clean