[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-commits] [SCM] lwIP - A Lightweight TCPIP stack branch, master

From: Joel Cunningham
Subject: Re: [lwip-commits] [SCM] lwIP - A Lightweight TCPIP stack branch, master, updated. master_at_STABLE-2_0_0-238-g9e0b367
Date: Mon, 23 Jan 2017 14:37:59 -0600


Thanks for clearing that up!


Here’s what I’m seeing for additional instances of index (includes lwip-contrib):

Locally scoped variables:

  E:\projects\lwip-contrib\apps\shell\shell.c(998):  unsigned int index = if_nametoindex(com->args[0]);
  E:\projects\lwip-contrib\ports\win32\pcapif.c(202):   int index = 0;

Index as a function parameter:

  E:\projects\lwip-contrib\addons\ipv6_static_routing\ip6_route_table.h(81):                          const ip6_addr_t *gateway, s8_t *index);
  E:\projects\lwip-contrib\ports\old\v2pro\include\netif\xemacif.h(41):void xemacif_setmac(u32_t index, u8_t *addr);
  E:\projects\lwip-contrib\ports\old\v2pro\include\netif\xemacif.h(42):u8_t * xemacif_getmac(u32_t index);
  E:\projects\lwip\src\core\netif.c(1305):netif_index_to_name(u8_t index, char *name)
  E:\projects\lwip\src\core\stats.c(116):stats_display_memp(struct stats_mem *mem, int index)
  E:\projects\lwip\src\include\netif\lowpan6.h(63):err_t lowpan6_set_context(u8_t index, const ip6_addr_t * context);


On Jan 23, 2017, at 2:14 PM, sg <address@hidden> wrote:

And 'index' always potentially shadows a global. However, it's not a problem unless you include that header file and compile it as plain old C. Hard to find...
Am 23. Jan. 2017, um 21:04, Joel Cunningham <address@hidden> schrieb:
Good catch on the missing “int” parameter!  Just curious, where is the global variable named “index”?  Also there are a lot of other uses of local variables named “index” in LwIP code.  Do these also have a shadowing problem?


On Jan 23, 2017, at 1:21 PM, Dirk Ziegelmeier <address@hidden> wrote:

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "lwIP - A Lightweight TCPIP stack".

The branch, master has been updated
via 9e0b36747a3c046f874a7c8697f1d5209371ab72 (commit)
from b5011e7012b2894a36e4ec71fb725618f3a78f32 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log

commit 9e0b36747a3c046f874a7c8697f1d5209371ab72
Author: Dirk Ziegelmeier <address@hidden>
Date: Mon Jan 23 20:21:49 2017 +0100

Fix warning about shadowing a global variable "index" in if.c

Summary of changes:
src/api/if.c | 8 ++++----
src/include/lwip/if.h | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)

lwIP - A Lightweight TCPIP stack

lwip-commits mailing list

lwip-commits mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]