somnisoft / smtp-client

SMTP Client Library in C
Creative Commons Zero v1.0 Universal
109 stars 31 forks source link

Microsoft compiler warning C4389 using warning level 4 #12

Open thradams opened 3 years ago

thradams commented 3 years ago

I had to disable warning warning C4389: '==': signed/unsigned mismatch around the macro FD_SET.

This is the new code to disable this warning.

ifdef SMTP_IS_WINDOWS

pragma warning( push )

pragma warning( disable : 4389 ) //warning C4389: '==': signed/unsigned mismatch

FD_SET(smtp->sock, &readfds);

pragma warning( pop )

else

FD_SET(smtp->sock, &readfds);

endif