Skip to content

[MISC] fix compiling error for MSVC. 'FALL_THROUGH': undeclared ident… #66

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

Merged
merged 2 commits into from
Sep 25, 2024

Conversation

zero-rp
Copy link
Contributor

@zero-rp zero-rp commented Sep 11, 2024

…ifier

@litespeedtech
Copy link
Owner

You patch maybe fix something for MSVC, but break everything else that does not support fallthrough attribute.
A proper fix need to combine

#  ifndef _MSC_VER
#    if defined __has_attribute && __has_attribute (fallthrough)

to one #if
Not sure why it is needed, __has_attribute (fallthrough) return true in MSVC, but does not support __attribute__ ((fallthrough))?

@zero-rp
Copy link
Contributor Author

zero-rp commented Sep 17, 2024

I will submit a new patch later,When I compiled using cmake in vs2022, the compiler reported the following:
.\lsquic\src\liblsquic\ls-qpack\lsqpack.c(57): error C2220: The following warnings are considered errors
.\lsquic\src\liblsquic\ls-qpack\lsqpack.c(57): warning C4067: Unexpected flag after preprocessor instruction - line break should be entered

@litespeedtech litespeedtech merged commit 1bb5285 into litespeedtech:master Sep 25, 2024
2 checks passed
@CL-Jeremy
Copy link

Hi, I just opened a new pull request #80 with alternative tests for fallthrough. Can you try if this works for your version of VS 2022 if you have time? Thanks in advance!

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.

3 participants