Skip to content

Create MSYS2.yaml and fix some issues on MSYS2. - #905

Open
minminlittleshrimp wants to merge 2 commits into
masterfrom
pffang/master
Open

Create MSYS2.yaml and fix some issues on MSYS2.#905
minminlittleshrimp wants to merge 2 commits into
masterfrom
pffang/master

Conversation

@minminlittleshrimp

Copy link
Copy Markdown
Collaborator

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.

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.
@minminlittleshrimp

Copy link
Copy Markdown
Collaborator Author

Hello @pffang please answer why we set baudrate to unused? I believe it use in switch case block?

@pffang

pffang commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

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.

@minminlittleshrimp

Copy link
Copy Markdown
Collaborator Author

@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

@pffang

pffang commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

@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 minminlittleshrimp left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look good to me

@minminlittleshrimp

Copy link
Copy Markdown
Collaborator Author

Hi @santhoshsivanhere
Kindly review and approve -> squash and merge
Thanks

Comment thread src/shared/dlt_common.c

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to keep DLT_UNUSED(baudrate); brefore return 0;.
Or it will not compiled on MSYS2.

Comment thread src/daemon/dlt-daemon.c
{
daemon_local->flags.offlineLogstorageMaxCounter = (unsigned int) atoi(value);
daemon_local->flags.offlineLogstorageMaxCounterIdx = (unsigned int) strlen(value);
if (ispunct((char)value[0]))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/daemon/dlt-daemon.c
fprintf(stderr, "Invalid input [%s] detected in option %s\n",
value,
token);
if (value_check[0] || !isdigit(value[0])) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants