-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix paltests build #103519
Fix paltests build #103519
Conversation
@@ -61,8 +61,8 @@ PALTEST(file_io_WriteFile_test2_paltest_writefile_test2, "file_io/WriteFile/test | |||
const char * testString = "The quick fox jumped over the lazy dog's back."; | |||
const int testStringLen = strlen(testString); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this implicit size_t -> int cast be made explicit as well? It is interesting that the compiler is not complaining about this strlen("constant string")
, but it is complaining about the other strlen("constant string")
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Declaring it as DWORD
also works without the explicit cast.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not depend on it. In general, compilers complain about any implicit narrowing these days.
src/coreclr/pal/tests/palsuite/file_io/WriteFile/test2/WriteFile.cpp
Outdated
Show resolved
Hide resolved
…le.cpp Co-authored-by: Jan Kotas <jkotas@microsoft.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
https://dev.azure.com/dnceng-public/public/_build/results?buildId=708804&view=logs&jobId=a3b522d2-1fcb-58aa-d1da-345566122d64&j=a3b522d2-1fcb-58aa-d1da-345566122d64&t=28177cd9-7046-57c0-17a4-2d126beee140