-
-
Notifications
You must be signed in to change notification settings - Fork 480
Closed
Labels
questionIssue can be closed by providing informationIssue can be closed by providing information
Description
would like to understand why the minimal example report so many warning:
crow version: v1.2.1.2
\crow\mustache.h(116,48): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
\crow\mustache.h(97,33): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
\crow\json.h(1747,32): warning C4267: 'return': conversion from 'size_t' to 'int', possible loss of data
\crow\json.h(1265,35): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possible loss of data
\crow\http_parser_merged.h(607,32): warning C4244: '=': conversion from '__int64' to 'unsigned long', possible loss of data
\crow\http_parser_merged.h(587,32): warning C4244: '=': conversion from '__int64' to 'unsigned long', possible loss of data
#ifdef _WIN64
#define _WIN32_WINNT 0x0A00 // Windows 10
#endif // End of _WIN64 check
#include "crow.h"
void main() {
crow::SimpleApp app; //define your crow application
//define your endpoint at the root directory
CROW_ROUTE(app, "/")([]() {
return "Hello world";
});
//set the port, set the app to run on multiple threads, and run the app
app.port(18080).multithreaded().run();
}
Metadata
Metadata
Assignees
Labels
questionIssue can be closed by providing informationIssue can be closed by providing information
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
gittiver commentedon Feb 27, 2025
Because we enabled this warnings some time ago for all systems and nobody was fixing them up to now.
It is easy to introduce new bugs by fixing them in my experience.
There is a draft for a pull request to fix them: #870
Hadn't the time to come back to the problem.
bcncpp commentedon Feb 27, 2025
The pr looks good do you have tests? The only concern can be multiplatfrom compatibilty.
gittiver commentedon Feb 27, 2025
i used the existing tests, the ci builds and test on ubuntu, windows and macOS.
[-][Question] many convesion warning at compilation time[/-][+][Question] many conversion warnings at compilation time[/+]