macro SOAP_SNPRINTF from stdsoap2.h may be mangled
Development toolkit for Web Services and XML data bindings for C & C++
Brought to you by:
engelen
stdsoap2.h shipped with the latest gsoap release includes the following macro definitions:
# ifdef HAVE_SNPRINTF
# if _MSC_VER >= 1400
# define SOAP_SNPRINTF(buf, len, num) void)_snprintf_s((buf), (len), _TRUNCATE
# define SOAP_SNPRINTF_SAFE(buf, len) void)_snprintf_s((buf), (len), _TRUNCATE
# else
# define SOAP_SNPRINTF(buf, len, num) void)snprintf((buf), (len)
# define SOAP_SNPRINTF_SAFE(buf, len) void)snprintf((buf), (len)
# endif
# else
# define SOAP_SNPRINTF(buf, len, num) (len) <= (num)) ? (void)((buf)[0] = '\0') : (void)sprintf((buf)
# define SOAP_SNPRINTF_SAFE(buf, len) void)sprintf((buf)
# endif
Looks mangled, leads to compiler warnings.
Please check.
No issues whatsover. Note that all uses have parenthesis in the code base: Like this:
So perfectly fine. This is to allow the result to be ignored with
(void)
.