-
Notifications
You must be signed in to change notification settings - Fork 3
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
COMP: explicitly handle all enum cases in switch #2
base: slicer-v3.4.0-2019-06-11-614110e7
Are you sure you want to change the base?
COMP: explicitly handle all enum cases in switch #2
Conversation
In VisualStudio 2019 error C4061 happens if you don't have a case statement for every value of an enum. The default condition is not enough. This fix avoids error like this: 25>C:\sq5\LibArchive\libarchive\archive_read_support_format_warc.c(344,2): error C4061: enumerator 'WT_NONE' in switch of enum 'warc_type_t' is not explicitly handled by a case label [C:\sq5\LibArchive-build\libarchive\archive.vcxproj]
This should really be moved upstream, since it seems not to have been fixed there. Let's not merge this, but keep this open in case anyone else hits the same issue before it's fixes upstream. |
Thanks for the fix. If you have some more time to work on this, could you also submit a PR on https://github.com/libarchive/libarchive ? Once done, you would change the commit title in our fork to |
Yes, that's the plan. I filed the issue upstream but not a PR yet. I was trying to fix the Chest Imaging Platform builds on windows when this cropped up so I wanted to make sure all the builds completed. |
That is great ! Once the extension is working again, I wonder if it could be used to process some COVID related data and gain some insight on the diseases. |
Yes, I hope so too! |
Upstream PR created: libarchive#1395 |
In VisualStudio 2019 error C4061 happens if you don't
have a case statement for every value of an enum.
The default condition is not enough.
This fix avoids error like this:
25>C:\sq5\LibArchive\libarchive\archive_read_support_format_warc.c(344,2): error C4061: enumerator 'WT_NONE' in switch of enum 'warc_type_t' is not explicitly handled by a case label [C:\sq5\LibArchive-build\libarchive\archive.vcxproj]