From 5fb58e23deb28e2060500d347d402c2f48386691 Mon Sep 17 00:00:00 2001 From: Kane York Date: Thu, 26 Nov 2020 17:25:11 -0800 Subject: fix(tvix): make unsigned conversion explicit Implicit signedness conversion was causing warnings. Perform a static_cast; this value should never be out of range. third_party/nix/src/libmain/shared.cc:310:12: warning: narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions] Change-Id: I34fe53d186ae33f970147135bbe3894fb39a0ec7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2156 Tested-by: BuildkiteCI Reviewed-by: tazjin Reviewed-by: glittershark --- third_party/nix/src/libmain/shared.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'third_party') diff --git a/third_party/nix/src/libmain/shared.cc b/third_party/nix/src/libmain/shared.cc index cd4b7879fd21..331ea6b3a9d2 100644 --- a/third_party/nix/src/libmain/shared.cc +++ b/third_party/nix/src/libmain/shared.cc @@ -307,7 +307,7 @@ int handleExceptions(const std::string& programName, if (!e.prefix().empty() && !settings.showTrace) { LOG(INFO) << "(use '--show-trace' to show detailed location information)"; } - return e.status; + return static_cast(e.status); } catch (std::bad_alloc& e) { LOG(ERROR) << error << "failed to allocate: " << e.what(); return 1; -- cgit 1.4.1