Re-enable some C++ warnings (#142332)

It enables some C++ warnings since the code base is fairly clean. Meanwhile, Wextra-semi is disabled on CUDA generated code since there is no way to fix them without the cooperation of CUDA team.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/142332
Approved by: https://github.com/albanD, https://github.com/eqy
This commit is contained in:
cyy
2024-12-12 04:02:12 +00:00
committed by PyTorch MergeBot
parent f892f9862a
commit 2903cf0ad8
11 changed files with 62 additions and 65 deletions

View File

@ -1888,7 +1888,6 @@ static PyObject* order(PyObject *_,
}
}
int ndim = 0;
int insert_point = -1;
Slice<DimEntry> new_levels;
for (auto l : levels) {
@ -1896,7 +1895,6 @@ static PyObject* order(PyObject *_,
continue;
}
if (l.is_positional()) {
ndim++;
if (insert_point == -1) {
insert_point = new_levels.size();
new_levels.extend(A, flat_positional_dims);