[roll] Roll fuchsia [stdcompat] Avoid implicit conversion, negative shift in bit_floor

std::bit_floor<T> returns T but it's built out of std::bit_width<T>
which returns int. The implementation implicitly converted bit_width's
int return value to T which can (depending on T) result in sign or width
conversion errors.

By definition this is safe becuase bit_width returns the number of bits
needed to store a number which will always fit in the type of that
number.

This also handles the case where the value is 0.

And this updates some copy & paste typos in the test that have no impact
other than confusing failure messages.

Original-Bug: b/259746255
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/855246
Original-Revision: 2c44bd8ba2ac39a79af11bf30770b5ab5bc65b40
GitOrigin-RevId: 7d16a8b26be69899366259265b39fdd4ac862f8e
Change-Id: I617636838a498903ec39be829a4ac4b1b0156d35
1 file changed
tree: 643f0fbdf43e70ace9ae6e7895c82baea852db65
  1. git-hooks/
  2. infra/
  3. third_party/
  4. cts
  5. firmware
  6. flower
  7. jiri.lock
  8. MILESTONE
  9. minimal
  10. prebuilts
  11. README.md
  12. stem
  13. test_durations
  14. toolchain
README.md

Integration

This repository contains Fuchsia's Global Integration manifest files.

Making changes

All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.

Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance via the IRC channel #fuchsia on Freenode.

Obtaining the source

First install Jiri.

Next run:

$ jiri init
$ jiri import minimal https://fuchsia.googlesource.com/integration
$ jiri update

Third party

Third party projects should have their own subdirectory in ./third_party.