pytorch
9fefb406 - Fix signed-to-unsigned conversion warning (#46834)

Commit
4 years ago
Fix signed-to-unsigned conversion warning (#46834) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/46834 `next` is set to `-1`, presumably to avoid an "undefined variable" warning. However, Setting `next=-1` gives a signed-to-unsigned warning. In practice, the `-1` wraps around to `size_t::max`. So we set this to `size_t::max` from the get go to avoid all warnings. Test Plan: Standard pre-commit test rig. Reviewed By: xw285cornell Differential Revision: D24481068 fbshipit-source-id: 58b8a1b027a129fc4994c8593838a82b3991be22
Author
Parents
Loading