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

Compiler warnings #111

Open
allenhuffman opened this issue May 3, 2021 · 0 comments
Open

Compiler warnings #111

allenhuffman opened this issue May 3, 2021 · 0 comments

Comments

@allenhuffman
Copy link

We recently built this library for a PIC24 on the CCS compiler. There are a number of code warnings. Some might be easy to resolve in the standard code, and others are the "I know what I am doing" type that would be compiler-specific to ignore. Here are some examples:

socket.c:

// 214 - Operator precedance rules may not be as intended, use () to clarify
524)
if((taddr == 0) && (getSn_MR(sn)&Sn_MR_MACRAW != Sn_MR_MACRAW)) return SOCKERR_IPINVALID;
if((port == 0) && (getSn_MR(sn)&Sn_MR_MACRAW != Sn_MR_MACRAW)) return SOCKERR_PORTZERO;

// 215 - Undefined identifier W5300
708)
#if WIZCHIP == W5300

// 237 - Extra comma
67)
static uint16_t sock_remained_size[WIZCHIP_SOCK_NUM] = {0,0,};
71)
uint8_t sock_pack_info[WIZCHIP_SOCK_NUM] = {0,};

These would require compiler-specific ignores, so I don't know if there is anything that could be done in the master source:

// 203 - Condition always TRUE
// 204 - Condition always FALSE

Can someone crank up the compiler warnings on a different compiler and see if these warnings exist there as well?

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

No branches or pull requests

1 participant