Skip to content

Commit

Permalink
[libc] fix more -Wmissing-brace (#77382)
Browse files Browse the repository at this point in the history
Similar to #77345, the buildbots are observing similar warnings for the
sse2
implementation.

llvm-project/libc/src/__support/HashTable/sse2/bitmask_impl.inc:36:13:
    error: suggest braces around initialization of subobject
    [-Werror,-Wmissing-braces]
    return {bitmask};
            ^~~~~~~
            {      }
llvm-project/libc/src/__support/HashTable/sse2/bitmask_impl.inc:45:13:
    error: suggest braces around initialization of subobject
    [-Werror,-Wmissing-braces]
    return {static_cast<uint16_t>(~mask_available().word)};
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            {                                            }

Link:
https://lab.llvm.org/buildbot/#/builders/163/builds/49350/steps/8/logs/stdio
Link: #74506
  • Loading branch information
nickdesaulniers committed Jan 8, 2024
1 parent 16b8a0d commit f700d74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libc/src/__support/HashTable/sse2/bitmask_impl.inc
Expand Up @@ -33,7 +33,7 @@ struct Group {
LIBC_INLINE IteratableBitMask match_byte(uint8_t byte) const {
auto cmp = _mm_cmpeq_epi8(data, _mm_set1_epi8(byte));
auto bitmask = static_cast<uint16_t>(_mm_movemask_epi8(cmp));
return {bitmask};
return {{bitmask}};
}

LIBC_INLINE BitMask mask_available() const {
Expand All @@ -42,7 +42,7 @@ struct Group {
}

LIBC_INLINE IteratableBitMask occupied() const {
return {static_cast<uint16_t>(~mask_available().word)};
return {{static_cast<uint16_t>(~mask_available().word)}};
}
};
} // namespace internal
Expand Down

0 comments on commit f700d74

Please sign in to comment.