Opened 4 years ago

Closed 4 years ago

#16212 closed defect (fixed)

MSVC is complaining about "close()" being deprecated in regards of "_close()"

Reported by: ghostvoodooman Owned by: vadz
Priority: low Milestone:
Component: wxMSW Version: dev-latest
Keywords: Cc:
Blocked By: Blocking:
Patch: no



NB: I don't use vanilla WX, but my customized, so line numbers might be inaccurate.

11>..\..\src\common\socket.cpp(538): message #1786: function "close" (declared at line 326 of "c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\io.h") was declared deprecated ("The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _close. See online help for details.")
11>        wxScopeGuard closeSocket = wxMakeGuard(close, fd);
11>                                               ^

my env: Win 8.1 Pro x64, WX trunk(adjusted), Unicode x64 DLL build, ICC compiler integrated to MSVC 2013.


Is this okay, or should we do some adjustments?

Change History (5)

comment:1 Changed 4 years ago by awi

In #15487 there is reported a similar issue.

comment:2 Changed 4 years ago by ghostvoodooman

Yes, but the ONLY warning I get is about close()/_close() that is not mentioned in #15487 . No other warnings I can see.

comment:3 Changed 4 years ago by vadz

  • Owner set to vadz
  • Priority changed from normal to low
  • Status changed from new to accepted

I'll fix this one, although it's completely harmless.

comment:4 Changed 4 years ago by ghostvoodooman

Indeed, IMO it is harmless. But I tend to code without warnings.

comment:5 Changed 4 years ago by VZ

  • Resolution set to fixed
  • Status changed from accepted to closed

In 76411:

Fix warning about using "deprecated" close() in MSVC build.

Use wxClose(), which is the same as _close() for MSVC.

Closes #16212.

Note: See TracTickets for help on using tickets.