tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit c6adc02ef02a1e78bc71a5f1e1aaa335e27274c9
parent 7a26c6d7a5fb669e0b3126d3ff1e6cd62180edaf
Author: André Bargull <andre.bargull@gmail.com>
Date:   Wed, 17 Dec 2025 13:42:07 +0000

Bug 2002525: Remove maybe_unused added for GCC<10. r=spidermonkey-reviewers,jandem

Differential Revision: https://phabricator.services.mozilla.com/D274126

Diffstat:
Mjs/src/jsapi-tests/testInt128.cpp | 26++++++++++----------------
1 file changed, 10 insertions(+), 16 deletions(-)

diff --git a/js/src/jsapi-tests/testInt128.cpp b/js/src/jsapi-tests/testInt128.cpp @@ -41,38 +41,34 @@ constexpr Uint128 operator""_u128() { constexpr auto digits = std::array{DIGITS...}; - // Add [[maybe_unused]] everywhere to please GCC <10. - - [[maybe_unused]] constexpr auto isBinaryDigit = [](auto c) { + constexpr auto isBinaryDigit = [](auto c) { return (c >= '0' && c <= '1') || c == '\''; }; - [[maybe_unused]] constexpr auto isOctalDigit = [](auto c) { + constexpr auto isOctalDigit = [](auto c) { return (c >= '0' && c <= '7') || c == '\''; }; - [[maybe_unused]] constexpr auto isDigit = [](auto c) { + constexpr auto isDigit = [](auto c) { return mozilla::IsAsciiDigit(c) || c == '\''; }; - [[maybe_unused]] constexpr auto isHexDigit = [](auto c) { + constexpr auto isHexDigit = [](auto c) { return mozilla::IsAsciiHexDigit(c) || c == '\''; }; - [[maybe_unused]] constexpr auto isBinary = + constexpr auto isBinary = [isBinaryDigit](auto zero, auto prefix, auto... rest) { return zero == '0' && (prefix == 'b' || prefix == 'B') && (isBinaryDigit(rest) && ...); }; - [[maybe_unused]] constexpr auto isHex = [isHexDigit](auto zero, auto prefix, - auto... rest) { + constexpr auto isHex = [isHexDigit](auto zero, auto prefix, auto... rest) { return zero == '0' && (prefix == 'x' || prefix == 'X') && (isHexDigit(rest) && ...); }; - [[maybe_unused]] constexpr auto binary = - [digits]() -> std::optional<Uint128> { + constexpr auto binary = [digits]() -> std::optional<Uint128> { auto value = Uint128{}; for (size_t i = 2; i < digits.size(); ++i) { auto digit = digits[i]; @@ -89,7 +85,7 @@ constexpr Uint128 operator""_u128() { return value; }; - [[maybe_unused]] constexpr auto octal = [digits]() -> std::optional<Uint128> { + constexpr auto octal = [digits]() -> std::optional<Uint128> { auto value = Uint128{}; for (size_t i = 1; i < digits.size(); ++i) { auto digit = digits[i]; @@ -106,8 +102,7 @@ constexpr Uint128 operator""_u128() { return value; }; - [[maybe_unused]] constexpr auto decimal = - [digits]() -> std::optional<Uint128> { + constexpr auto decimal = [digits]() -> std::optional<Uint128> { auto value = Uint128{}; for (size_t i = 0; i < digits.size(); ++i) { auto digit = digits[i]; @@ -121,8 +116,7 @@ constexpr Uint128 operator""_u128() { return value; }; - [[maybe_unused]] constexpr auto hexadecimal = - [digits]() -> std::optional<Uint128> { + constexpr auto hexadecimal = [digits]() -> std::optional<Uint128> { auto value = Uint128{}; for (size_t i = 2; i < digits.size(); ++i) { auto digit = digits[i];