Skip to content

Multiple instances of INADDR_NONE [imported] #1007

Closed
@cmaglie

Description

@cmaglie

This is Issue 1007 moved from a Google Code project.
Added by 2012-08-16T18:20:18.000Z by sebastia...@gmail.com.
Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Defect, Priority-Medium

Original description

What steps will reproduce the problem?

  1. Sketch with two files, each importing (directly or indirectly) IPAddress.h
  2. avr-nm -n on the resulting elf (on Windows)

What is the expected output? What do you see instead?
Expect only a single instance of INADDR_NONE in .bss section, but multiple are allocated, consuming precious SRAM space (in my case of a bigger piece of software, seven instances).

Note also that IPAddress consumes six bytes, not four, due to the class pointer required for the virtual function.

This is on arduino-1.0.1 under Windows 7.

Please provide any additional information below.
Suggest to declare INADDR_NONE extern in IPAddress.h, and to define it in IPAddress.cpp.

Metadata

Metadata

Assignees

Labels

Component: CoreRelated to the code for the standard Arduino API

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions