[issue #2] remove compiler warning for typedef'ed generic compare function and its specific implementation#3
Open
bonitoflakez wants to merge 3 commits intodevprabal:mainfrom
Open
[issue #2] remove compiler warning for typedef'ed generic compare function and its specific implementation#3bonitoflakez wants to merge 3 commits intodevprabal:mainfrom
bonitoflakez wants to merge 3 commits intodevprabal:mainfrom
Conversation
…nction and its specific implementation
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.
Issue generated in #2 was due to a combination of missing declarations and incorrect function pointer assignments.
Error Identification: We encountered an error indicating an incompatible pointer type when initializing
compare_item_func_list.Understanding Error: Error message pointed to the
compare_item_func_listinitialization, suggesting an issue with thecompare_personfunction pointer.Declaration of
compare_item_func_list: We found thatcompare_item_func_listwas not correctly declared. To address this, we definedcompare_item_func_tas a function pointer type.Declaration of
compare_person: We noticed that thecompare_personfunction was missing its declaration. We added the declaration ofcompare_personbefore thecompare_person_wrapperfunction.Modification of Wrapper Function: We modified the
compare_person_wrapperfunction to have the correct signature and included the call to thecompare_personfunction.Definition of
compare_person: Finally, we added the implementation of thecompare_personfunction based on the desired comparison criteria.