Fix some header includes issues
spl_inl_armv7.h: value size does not match register size specified by the constraint and modifier [-Werror,-Wasm-operand-widths]
98 | __asm __volatile("clz %0, %1" : "=r"(tmp) : "r"(a));
asm_defines.h:19:1: error: cannot use dot operator on a type
19 | .section .note.GNU-stack,"",%progbits
| ^
1 error generated.
on windows: error: use of undeclared identifier 'INADDR_LOOPBACK'
112 | ipv4_network_("network", "unittest", IPAddress(INADDR_LOOPBACK), 32),
audio_device_module_error_handler.h:15:17: error: unknown type name 'uint8_t'
Change-Id: I7ed1f626088ea2f3d4acbb8ef8625e93c5c14026
Bug: webrtc:251890128
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/468460
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47584}
diff --git a/common_audio/signal_processing/include/spl_inl_armv7.h b/common_audio/signal_processing/include/spl_inl_armv7.h
index 6fc3e7c..6f1b315 100644
--- a/common_audio/signal_processing/include/spl_inl_armv7.h
+++ b/common_audio/signal_processing/include/spl_inl_armv7.h
@@ -17,6 +17,9 @@
#include <stdint.h>
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wasm-operand-widths"
+
/* TODO(kma): Replace some assembly code with GCC intrinsics
* (e.g. __builtin_clz).
*/
@@ -135,4 +138,6 @@
return (int16_t)out;
}
+#pragma clang diagnostic pop
+
#endif // COMMON_AUDIO_SIGNAL_PROCESSING_INCLUDE_SPL_INL_ARMV7_H_
diff --git a/rtc_base/network_constants.h b/rtc_base/network_constants.h
index 8511405..0b7ae9d 100644
--- a/rtc_base/network_constants.h
+++ b/rtc_base/network_constants.h
@@ -44,13 +44,15 @@
// Aliases for correct wrap-around with network slice cost.
constexpr uint16_t kNetworkCostCellular5GSlice = // 248
- kNetworkCostCellular5G + kNetworkCostSlice;
+ static_cast<uint16_t>(kNetworkCostCellular5G + kNetworkCostSlice);
constexpr uint16_t kNetworkCostCellular5GVpnSlice = // 249
- kNetworkCostCellular5G + kNetworkCostVpn + kNetworkCostSlice;
+ static_cast<uint16_t>(kNetworkCostCellular5G + kNetworkCostVpn +
+ kNetworkCostSlice);
constexpr uint16_t kNetworkCostCellularSlice = // 898
- kNetworkCostCellular + kNetworkCostSlice;
+ static_cast<uint16_t>(kNetworkCostCellular + kNetworkCostSlice);
constexpr uint16_t kNetworkCostCellularVpnSlice = // 899
- kNetworkCostCellular + kNetworkCostVpn + kNetworkCostSlice;
+ static_cast<uint16_t>(kNetworkCostCellular + kNetworkCostVpn +
+ kNetworkCostSlice);
// alias
constexpr uint16_t kNetworkCostHigh = kNetworkCostCellular;
diff --git a/rtc_base/system/asm_defines.h b/rtc_base/system/asm_defines.h
index a7f6aad..681c612 100644
--- a/rtc_base/system/asm_defines.h
+++ b/rtc_base/system/asm_defines.h
@@ -11,6 +11,8 @@
#ifndef RTC_BASE_SYSTEM_ASM_DEFINES_H_
#define RTC_BASE_SYSTEM_ASM_DEFINES_H_
+#ifdef __ASSEMBLER__
+
// clang-format off
// clang formatting breaks everything here, e.g. concatenating directives,
// due to absence of context via asm keyword.
@@ -69,4 +71,6 @@
// clang-format on
+#endif // __ASSEMBLER__
+
#endif // RTC_BASE_SYSTEM_ASM_DEFINES_H_
diff --git a/sdk/objc/native/api/audio_device_module_error_handler.h b/sdk/objc/native/api/audio_device_module_error_handler.h
index 1b73a53..f568090 100644
--- a/sdk/objc/native/api/audio_device_module_error_handler.h
+++ b/sdk/objc/native/api/audio_device_module_error_handler.h
@@ -11,6 +11,8 @@
#ifndef SDK_OBJC_NATIVE_API_AUDIO_DEVICE_MODULE_ERROR_HANDLER_H
#define SDK_OBJC_NATIVE_API_AUDIO_DEVICE_MODULE_ERROR_HANDLER_H
+#include <cstdint>
+
namespace webrtc {
enum ADMError : uint8_t {
// Generic.