Fix 64 to 32 bit narrowing in dawn::wire

Bug: dawn:1377
Change-Id: I310daeb99de986389e79282b99006e95964149ea
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87671
Commit-Queue: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Loko Kung <lokokung@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/dawn/wire/server/ServerAdapter.cpp b/src/dawn/wire/server/ServerAdapter.cpp
index a1df75b..8a6901e 100644
--- a/src/dawn/wire/server/ServerAdapter.cpp
+++ b/src/dawn/wire/server/ServerAdapter.cpp
@@ -93,7 +93,7 @@
             }
         }
 
-        cmd.featuresCount = features.size();
+        cmd.featuresCount = static_cast<uint32_t>(features.size());
         cmd.features = features.data();
 
         WGPUSupportedLimits limits = {};
diff --git a/src/dawn/wire/server/ServerInstance.cpp b/src/dawn/wire/server/ServerInstance.cpp
index 529bb48..1099800 100644
--- a/src/dawn/wire/server/ServerInstance.cpp
+++ b/src/dawn/wire/server/ServerInstance.cpp
@@ -86,7 +86,7 @@
         // Hide features the wire cannot support.
         auto it = std::partition(features.begin(), features.end(), IsFeatureSupported);
 
-        cmd.featuresCount = std::distance(features.begin(), it);
+        cmd.featuresCount = static_cast<uint32_t>(std::distance(features.begin(), it));
         cmd.features = features.data();
 
         mProcs.adapterGetProperties(adapter, &properties);