[libc-commits] [PATCH] D108800: [libc] Fix various -Wconversion warnings in strto*l test code.
Michael Jones via Phabricator via libc-commits
libc-commits at lists.llvm.org
Fri Aug 27 10:12:34 PDT 2021
michaelrj added inline comments.
================
Comment at: libc/test/src/stdlib/strtol_test.cpp:164
ASSERT_EQ(__llvm_libc::strtol(small_string, nullptr, base),
first_digit);
ASSERT_EQ(errno, 0);
----------------
If you're changing the types of base and the digits then you also have to add a cast to the appropriate type on each of the ASSERT_EQs in the loops, since if the base types are int then the resulting type will also be int, which won't match the type of the output of the functions.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108800/new/
https://reviews.llvm.org/D108800
More information about the libc-commits
mailing list