Skip to content

Fix Build warning C4068 for MSVC#221

Merged
AddressXception merged 1 commit intoElection-Tech-Initiative:mainfrom
avinal:avinal/issue216
Oct 22, 2021
Merged

Fix Build warning C4068 for MSVC#221
AddressXception merged 1 commit intoElection-Tech-Initiative:mainfrom
avinal:avinal/issue216

Conversation

@avinal
Copy link
Copy Markdown
Contributor

@avinal avinal commented Oct 21, 2021

Signed-off-by: Avinal Kumar avinal.xlvii@gmail.com

Issue

Link your PR to an issue

Fixes #216

Description

  • GCC pragma is not a valid pragma in MSVC, thus produces warning C4068:
    unknown pragma 'GCC'.
  • The workaround is to encapsulate the GCC pragma in if GNUC defined
    block.

Testing

Describe the best way to test or validate your PR.

  • Please approve for the first run and it will validate itself 😄

@keithrfung keithrfung added the hacktoberfest Issues for the Hacktoberfest label Oct 21, 2021
@keithrfung
Copy link
Copy Markdown
Contributor

@avinal One of the builds failed. Take a look.

- GCC pragma is not a valid pragma in MSVC, thus produces warning C4068:
unknown pragma 'GCC'.
- The workaround is to encapsulate the GCC pragma in if GNUC defined
block.

Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
@avinal
Copy link
Copy Markdown
Contributor Author

avinal commented Oct 21, 2021

Hey @keithrfung, mistakenly I wrapped the whole pragma into if directive, I have fixed it now.

@avinal
Copy link
Copy Markdown
Contributor Author

avinal commented Oct 21, 2021

Finally 😅 its complete

@keithrfung
Copy link
Copy Markdown
Contributor

@avinal I know right? It's a long build. hahaha.

@keithrfung keithrfung self-requested a review October 21, 2021 19:14
Copy link
Copy Markdown
Contributor

@keithrfung keithrfung left a comment

Choose a reason for hiding this comment

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

This looks good to me. I'm going to let @AddressXception review this though.

Marking this as hacktoberfest-approved.

@keithrfung keithrfung added the hacktoberfest-accepted Pull Request will count towards Hacktoberfest label Oct 21, 2021
@avinal
Copy link
Copy Markdown
Contributor Author

avinal commented Oct 22, 2021

@avinal I know right? It's a long build. hahaha.

Very long🥲, and for 4 line change it felt like a lifetime 😂.

@AddressXception AddressXception merged commit a29c8b4 into Election-Tech-Initiative:main Oct 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest Issues for the Hacktoberfest hacktoberfest-accepted Pull Request will count towards Hacktoberfest

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🧹 Resolve build warning: C4068 unknown pragma 'GCC'

3 participants