Skip to content
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

this change to mercury.c address following error and warnings: #148

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lefty01
Copy link

@lefty01 lefty01 commented Mar 11, 2024

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

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
@lefty01
Copy link
Author

lefty01 commented Mar 11, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant