Remove ambiguity when using error().code().

A recent change in android::base::Result has changed the type of
error().code() from int to Errno. The latter is a new type that provides
a type-safe way of handling errno values. The new type supports
conversion to and from int for compatibility reasons. However, that
conversion has caused an ambiguity when int and Error are used at the
same time in a ternary operator. The type of an expression "(cond) ? 0 :
ret.error().code()" is ambiguous. It can be int because error().code()
can be converted to an int. It can also be Error because 0 can be
converted to Errno.

To eliminate the ambiguity, add a static cast.

Bug: 209929099
Test: m
Change-Id: I0ad634310d9094868c29754f96c5c98e6180b738
diff --git a/staticlibs/netd/libnetdutils/include/netdutils/Status.h b/staticlibs/netd/libnetdutils/include/netdutils/Status.h
index bc347d5..7b0bd47 100644
--- a/staticlibs/netd/libnetdutils/include/netdutils/Status.h
+++ b/staticlibs/netd/libnetdutils/include/netdutils/Status.h
@@ -42,7 +42,7 @@
     Status(int code, std::string msg) : mCode(code), mMsg(std::move(msg)) { assert(!ok()); }
 
     Status(android::base::Result<void> result)
-        : mCode(result.ok() ? 0 : result.error().code()),
+        : mCode(result.ok() ? 0 : static_cast<int>(result.error().code())),
           mMsg(result.ok() ? "" : result.error().message()) {}
 
     int code() const { return mCode; }