Xilinx / Xilinx/embeddedsw

Compiler warning lwip / xadapter.c

Open
#282 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.