this change to mercury.c address following error and warnings:#148
Open
lefty01 wants to merge 2 commits intogotthardp:masterfrom
Open
this change to mercury.c address following error and warnings:#148lefty01 wants to merge 2 commits intogotthardp:masterfrom
lefty01 wants to merge 2 commits intogotthardp:masterfrom
Conversation
mercury.c: In function ‘parse_gen2filter’: mercury.c:442:86: warning: comparison of integer expressions of different signedness: ‘TMR_GEN2_Select_action’ and ‘int’ [-Wsign-compare] 442 | else if ((tag_filter->u.gen2Select.action = str2action(object2str(obj))) == -1) mercury.c: In function ‘Reader_write_tag_mem’: mercury.c:1007:135: error: macro "TMR_writeTagMemBytes" requires 7 arguments, but only 6 given 1007 | ret = TMR_writeTagMemBytes(&self->reader, tag_filter, bank, address, PyByteArray_Size(data), (uint8_t *)PyByteArray_AsString(data)); mercury.c: In function ‘PyInit_mercury’: mercury.c:2363:5: warning: ‘PyEval_InitThreads’ is deprecated [-Wdeprecated-declarations] 2363 | PyEval_InitThreads(); TMR_writeTagMemBytes is marked deprecated in the tm_reader.h file from latest api
Author
|
the mismatch in args for TMR_writeTagMemBytes is causing an real error. so it's debateable whether to fix it or remove as I did due to the deprecation message in the api source. same goes for the warnings, maybe handling the unsigned vs signed compare this way is not the best ... or we eant to ignore. so this is just an idea. |
This was referenced Sep 14, 2024
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.
mercury.c: In function ‘parse_gen2filter’:
mercury.c:442:86: warning: comparison of integer expressions of different signedness: ‘TMR_GEN2_Select_action’ and ‘int’ [-Wsign-compare]
442 | else if ((tag_filter->u.gen2Select.action = str2action(object2str(obj))) == -1)
mercury.c: In function ‘Reader_write_tag_mem’:
mercury.c:1007:135: error: macro "TMR_writeTagMemBytes" requires 7 arguments, but only 6 given
1007 | ret = TMR_writeTagMemBytes(&self->reader, tag_filter, bank, address, PyByteArray_Size(data), (uint8_t *)PyByteArray_AsString(data));
mercury.c: In function ‘PyInit_mercury’:
mercury.c:2363:5: warning: ‘PyEval_InitThreads’ is deprecated [-Wdeprecated-declarations]
2363 | PyEval_InitThreads();
TMR_writeTagMemBytes is marked deprecated in the tm_reader.h file from latest api