Closed Bug 1035068 Opened 10 years ago Closed 10 years ago

VS2013: Deprecated API WSAAddressToStringA in DataChannel.cpp

Categories

(Core :: WebRTC: Networking, defect)

33 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: away, Assigned: away)

References

Details

Attachments

(1 file)

With a mozconfig containing --enable-warnings-as-errors, the build fails with:

 6:05.69 s:/vs2013/netwerk/sctp/datachannel/DataChannel.cpp(1557) : error C2220: warning treated as error - no 'object' file generated
 6:05.69 Warning: C4996 in s:\vs2013\netwerk\sctp\datachannel\DataChannel.cpp: 'WSAAddressToStringA': Use WSAAddressToStringW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings

I'm not sure why this wasn't an issue in the past. That part of DataChannel.cpp hasn't changed recently, and that directory has had FAIL_ON_WARNINGS since August at least. I did recently update to VS2013 Update 3 RC, but it would be odd for such an update to mess with my SDK headers.
http://dxr.mozilla.org/mozilla-central/source/netwerk/sctp/datachannel/DataChannel.cpp#1556

Am I reading DataChannelConnection::HandlePeerAddressChangeEvent correctly? It looks busted on Windows. The result of WSAAddressToStringA is not used, other than the return code. Was it supposed to do |addr = addr_buf| or something?
Flags: needinfo?(rjesup)
Yikes, and there's a fallthrough in "case AF_INET6" as well.

I guess that means this logging code isn't used much? I wonder if anyone would notice if we just removed that API call...
DataChannels in WebRTC only uses AF_CONN.  That code was put in there for completeness originally, especially if it were to be used in another context.

The simplest solution would be to just not print the address (just the type), or only print the address on linux.
Flags: needinfo?(rjesup)
Wouldn't be terribly hard to fix that to work properly, just toss in a unicode conversion. (But it's logging code and might be easier to just remove it.)
I admit it, I took the cheap route. Anyone who disagrees is welcome to take over the bug :-)
Attachment #8452119 - Flags: review?(rjesup)
Attachment #8452119 - Flags: review?(rjesup) → review+
https://hg.mozilla.org/mozilla-central/rev/5ab4be45484c
Assignee: nobody → dmajor
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: