Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix casting and unused variable problems on windows #255

Merged
merged 2 commits into from
Jan 27, 2023

Conversation

jpbland1
Copy link
Contributor

ZD 14996

@jpbland1 jpbland1 marked this pull request as ready for review January 27, 2023 18:54
@dgarske dgarske self-assigned this Jan 27, 2023
@@ -103,7 +103,8 @@ static const char pemFileKey[] = "key.pem";
extern double current_time(int reset);
return current_time(reset);
#elif defined(_WIN32)
return ((double)GetTickCount64())/1000.0;
(void)reset;
return (0.0 + GetTickCount64())/1000.0;
Copy link
Contributor

Choose a reason for hiding this comment

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

What was the original error/warning? I don't like the 0.0 workaround. Can you try using the following? return ((double)GetTickCount64())/1000.0F;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it doesn't like that we're casting the return value of a function, the error was -Werror=bad-function-cast, let me see if it complains if I put it in a variable first

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah compiler is fine with it as long as it's stored in a variable fist, should be good now

@jpbland1 jpbland1 requested a review from dgarske January 27, 2023 22:29
@dgarske dgarske merged commit ae280a7 into wolfSSL:master Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants