Remove redefinition of static keyword #14816
Closed
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.
Problem: Ancient preprocessor hack could lead to very confusing build errors.
Solution: Use simpler XPM that reflects current source control approach.
My primary concern here is removing the redefinition of
static
. This was seemingly originally used as a workaround to GTKv1 vs GTKv2 API difference. When GTKv1 support was dropped, this redefinition should have also been abandoned in favor of declaring the XPM datastatic const
. Those XPM files have been in version control, unchanged since 2004. Beyond being unnecessary, if one misplaces an#if
or an#end
this can result in very confusing "invalid storage class for function" errors because some functions will effectively be declaredstatic const
.I've also removed this
magick
define/undef sequence because AFAICT it serves no purpose. If anyone knows a good reason this should remain, I'm open to keeping it but if we keep it then it's purpose should be documented. My best guess is that either at some point prior to the XPM files being put under version control they included code that interacted with thatmagick
symbol. I consulted the v6.4 source code on the FTP archive and that version does not include any of this code so there seems to be a gap between v6.4 and the v7 sources in the git repo.