Compiler warning lwip / xadapter.c
Open
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 1.2k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
there is another warning when compiling xadapter.c
embeddedsw/ThirdParty/sw_services/lwip211/src/contrib/ports/xilinx/netif/xadapter.c:174:57: warning: passing argument 2 of 'netif_add' from incompatible pointer type [-Wincompatible-pointer-types]
| return netif_add(netif, ipaddr, netmask, gw,
| ^~~~~~
| |
| ip_addr_t * {aka struct ip_addr *}
The fragement
return netif_add(netif, ipaddr, netmask, gw,
should become
return netif_add( netif,
(const ip4_addr_t *) ipaddr,
(const ip4_addr_t *) netmask,
(const ip4_addr_t *) gw,
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open embeddedsw/ThirdParty/sw_services/lwip211/src/contrib/ports/xilinx/netif/xadapter.c and inspect the netif_add call around line 174. Apply the casts shown in the issue, then compile xadapter.c and confirm the incompatible-pointer-type warning is gone.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100