Try this replacement:
#define WORKAROUND_FD_CLR(fd, set) \
__pragma( warning( push ) ) \
__pragma( warning( disable : 4548 ) ) \
FD_CLR(fd, set) \
__pragma( warning( pop ) )
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
This is because of while (0, 0) in the following macros:
#define FD_CLR(fd, set) do { \
u_int __i; \
for (__i = 0; __i < ((fd_set FAR *)(set))->fd_count ; __i++) { \
if (((fd_set FAR *)(set))->fd_array[__i] == fd) { \
while (__i < ((fd_set FAR *)(set))->fd_count-1) { \
((fd_set FAR *)(set))->fd_array[__i] = \
((fd_set FAR *)(set))->fd_array[__i+1]; \
__i++; \
} \
((fd_set FAR *)(set))->fd_count--; \
break; \
} \
} \
} while(0, 0)
Original issue: https://developercommunity.visualstudio.com/content/problem/560279/winsock2h-generates-expression-before-comma-has-no.html
Now re-posting this https://aka.ms/AA539zf from Feedback Hub because it remained unresolved.
Try this replacement:
#define WORKAROUND_FD_CLR(fd, set) \
__pragma( warning( push ) ) \
__pragma( warning( disable : 4548 ) ) \
FD_CLR(fd, set) \
__pragma( warning( pop ) )
Hi @Ilia - Which version of SDK you are using? I can see the while(0,0)
has been fixed to the while(0)
in SDK version 10.0.19613.0.
#define FD_CLR(fd, set) do { \
u_int __i; \
for (__i = 0; __i < ((fd_set FAR *)(set))->fd_count ; __i++) { \
if (((fd_set FAR *)(set))->fd_array[__i] == fd) { \
while (__i < ((fd_set FAR *)(set))->fd_count-1) { \
((fd_set FAR *)(set))->fd_array[__i] = \
((fd_set FAR *)(set))->fd_array[__i+1]; \
__i++; \
} \
((fd_set FAR *)(set))->fd_count--; \
break; \
} \
} \
} while(0)
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.