-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Description
MSVC is reporting a bunch of warnings regarding the use of uint64_t throughout the library when building on 32 bit, which are due to the implicit casts to size_t (which is 32 bit rather than 64 bit.)
Perhaps size_t should be used for data lenghts and such rather than uint64_t?
httplib.h(1419): warning C4244: 'argument': conversion from 'uint64_t' to 'size_t', possible loss of data
httplib.h(1441): warning C4244: 'argument': conversion from 'uint64_t' to 'const unsigned int', possible loss of data
httplib.h(1751): warning C4244: 'argument': conversion from 'uint64_t' to 'const unsigned int', possible loss of data
httplib.h(2100): warning C4244: '=': conversion from 'uint64_t' to 'size_t', possible loss of data
httplib.h(2227): warning C4244: 'argument': conversion from '_Ty2' to 'const unsigned int', possible loss of data
httplib.h(2227): warning C4244: 'argument': conversion from '_Ty1' to 'const unsigned int', possible loss of data
httplib.h(1382): warning C4244: 'argument': conversion from 'uint64_t' to 'size_t', possible loss of data
httplib.h(1385): warning C4244: 'argument': conversion from 'uint64_t' to 'size_t', possible loss of data
There are also a number of cases where detail::ContentReceiverCore is set with the wrong callback parameters:
if (!detail::read_content(strm, req, payload_max_length_, res.status,
Progress(), [&](const char *buf, size_t /* produces a warning because it's not uint64_t */ n) {
req.body.append(buf, n);
return true;
})) {Pospelove
Metadata
Metadata
Assignees
Labels
No labels