Create MSYS2.yaml and fix some issues on MSYS2. - #905
Conversation
Add MSYS2 building action to check building issues on MSYS2. Fix some "error=char-subscripts" for isdigit and isspace functions by adding explicit cast to int, which is required by C99 standard and later.
|
Hello @pffang please answer why we set baudrate to unused? I believe it use in switch case block? |
You can check the macro detection inside the speed_t dlt_convert_serial_speed(int baudrate) function. MSYS will define the _CYGWIN macro, so it will go to the #else branch, and this branch doesn't use the baudrate parameter. |
|
@pffang This PR somehow block gtest dlt user from finishing, please check the touching in dlt common to see if the root cause from there |
That's strange. My changes only adapt to the strict grammar checking in the newer compiler, don't include any logic modification. |
minminlittleshrimp
left a comment
There was a problem hiding this comment.
Look good to me
|
Hi @santhoshsivanhere |
There was a problem hiding this comment.
You need to keep DLT_UNUSED(baudrate); brefore return 0;.
Or it will not compiled on MSYS2.
| { | ||
| daemon_local->flags.offlineLogstorageMaxCounter = (unsigned int) atoi(value); | ||
| daemon_local->flags.offlineLogstorageMaxCounterIdx = (unsigned int) strlen(value); | ||
| if (ispunct((char)value[0])) |
There was a problem hiding this comment.
Can you use ispunct((int)value[0] ? The function prototype for ispunct takes an int as a parameter. You can check the C library manual for this.
| fprintf(stderr, "Invalid input [%s] detected in option %s\n", | ||
| value, | ||
| token); | ||
| if (value_check[0] || !isdigit(value[0])) { |
There was a problem hiding this comment.
Can you use isdigit((int)value[0] ? Like ispunct The function prototype for isdigit also takes an int as a parameter. You can check the C library manual for this.
Add MSYS2 building action to check building issues on MSYS2.
Fix some "error=char-subscripts" for isdigit and isspace functions by adding explicit cast to int,
which is required by C99 standard and later.