[cppcms] Fix narrowing for clang-cl builds (#26251)

* [cppcms] fix narrowing error with clang-cl

* v db
This commit is contained in:
Alexander Neumann 2022-08-10 20:23:31 +02:00 committed by GitHub
parent afa74ae0f2
commit 8056e214c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 21 additions and 2 deletions

View File

@ -0,0 +1,13 @@
diff --git a/src/session_win32_file_storage.cpp b/src/session_win32_file_storage.cpp
index ce3fba330..a5e54be84 100644
--- a/src/session_win32_file_storage.cpp
+++ b/src/session_win32_file_storage.cpp
@@ -186,7 +186,7 @@ void session_file_storage::save_to_file(HANDLE h,time_t timeout,std::string cons
int64_t timeout;
uint32_t crc;
uint32_t size;
- } tmp = { timeout, 0, in.size() };
+ } tmp = { timeout, 0, static_cast<uint32_t>(in.size()) };
impl::crc32_calc crc_calc;
crc_calc.process_bytes(in.data(),in.size());
tmp.crc=crc_calc.checksum();

View File

@ -7,6 +7,7 @@ vcpkg_from_github(
SHA512 e99d34d14fbde22be725ac2c0bec069fb584e45c66767af75efaf454ca61a7a5e57434bf86109f910884c72202b8cf98fe16505e7d3d30d9218abd4d8b27d5df
PATCHES
no-tests-and-examples.patch
fix_narrowing_error.patch
)
vcpkg_find_acquire_program(PYTHON2)

View File

@ -1,7 +1,7 @@
{
"name": "cppcms",
"version": "1.2.1",
"port-version": 5,
"port-version": 6,
"description": "CppCMS is a Free High Performance Web Development Framework (not a CMS) aimed at Rapid Web Application Development",
"homepage": "https://github.com/artyom-beilis/cppcms",
"license": "MIT",

View File

@ -1622,7 +1622,7 @@
},
"cppcms": {
"baseline": "1.2.1",
"port-version": 5
"port-version": 6
},
"cppcodec": {
"baseline": "0.2",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "e2fff22eecee1fc50eee291ea49bed2717704031",
"version": "1.2.1",
"port-version": 6
},
{
"git-tree": "33ff6dbb307c2baceec0a21f05e098c0d15a8f88",
"version": "1.2.1",