From 9dca56dced68cd71a467809a8ed5ccfe079330c3 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Wed, 19 Feb 2014 16:07:07 +0100 Subject: [PATCH] Don't use IPAddress::_address from EthernetClass EthernetClass is a friend class of IPAddress, so it is allowed to use its _address attribute directly. However, it should be using IPAddress::raw_address() instead, like all the other friend classes do. This changes allows changing the _address attribute to fix some warnings next. --- libraries/Ethernet/src/Ethernet.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/Ethernet/src/Ethernet.cpp b/libraries/Ethernet/src/Ethernet.cpp index 8b5935eb7..0f9effb1a 100644 --- a/libraries/Ethernet/src/Ethernet.cpp +++ b/libraries/Ethernet/src/Ethernet.cpp @@ -62,9 +62,9 @@ void EthernetClass::begin(uint8_t *mac, IPAddress local_ip, IPAddress dns_server { W5100.init(); W5100.setMACAddress(mac); - W5100.setIPAddress(local_ip._address); - W5100.setGatewayIp(gateway._address); - W5100.setSubnetMask(subnet._address); + W5100.setIPAddress(local_ip.raw_address()); + W5100.setGatewayIp(gateway.raw_address()); + W5100.setSubnetMask(subnet.raw_address()); _dnsServerAddress = dns_server; }