Fix: expat fallthrough attribute for MSVC compatibility#61
Closed
dcliftreaves wants to merge 20 commits into
Closed
Fix: expat fallthrough attribute for MSVC compatibility#61dcliftreaves wants to merge 20 commits into
dcliftreaves wants to merge 20 commits into
Conversation
fixed 3 potential memory leaks when function PrepareCodebooks
Fixed file handle leaks in read_from_file() and write_to_file()
Mac build and run instructions
Removed an incorrect cast.
Add Linux instructions ('make' vs 'make .')
…ll' after 'make' so 'gpr_tools' executable is available system-wide.
…ke install' after 'make' so 'gpr_tools' executable is available system-wide." This reverts commit 7a3a1cb.
Add Hero5 Black GPR Sample Raw Photo
clean unused var and made for loop more readable
* make __attribute__((fallthrough)) more portable for GCC (>= 7) and CLANG (>= 10)
Replace raw __attribute((fallthrough)) with the FALL_THROUGH macro already defined in expat_lib/internal.h. The macro expands to __attribute__((fallthrough)) on GCC/Clang and ((void)0) on MSVC. Without this fix, MSVC produces: error C2065: 'fallthrough': undeclared identifier Credit: approach from gopro#51 by @keenanjohnson Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
189b4c6 to
c10883c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace raw
__attribute((fallthrough))in xmltok.c and xmltok_impl.c with theFALL_THROUGHmacro already defined in internal.h. The macro expands to__attribute__((fallthrough))on GCC/Clang and((void)0)on MSVC.Without this fix, MSVC produces:
error C2065: 'fallthrough': undeclared identifier2 files changed, 4 substitutions. Credit: approach from #51 by @keenanjohnson.
🤖 Generated with Claude Code