From: Travis Cross Date: Thu, 17 May 2012 06:13:32 +0000 (+0000) Subject: squelch a Windows VS warning about null termination on the ZID X-Git-Tag: v1.2.0~370 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5484651ce473636fcfb5ecc2a4289c4645319ca;p=thirdparty%2Ffreeswitch.git squelch a Windows VS warning about null termination on the ZID According Jeff Lenk, Windows Visual Studio doesn't understand that people use the char type for non-null-terminated byte arrays, so it throws a warning about this that causes the build to fail on Windows. As the initial value for the ZID doesn't really matter here one iota, just null-terminate it on Windows. --- diff --git a/src/switch_rtp.c b/src/switch_rtp.c index 9c42520ff9..c4030148aa 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -73,7 +73,11 @@ typedef srtp_hdr_t rtp_hdr_t; #ifdef ENABLE_ZRTP #include "zrtp.h" static zrtp_global_t *zrtp_global; +#ifndef WIN32 static zrtp_zid_t zid = { "FreeSWITCH01" }; +#else +static zrtp_zid_t zid = { "FreeSWITCH0\0" }; +#endif static int zrtp_on = 0; #define ZRTP_MITM_TRIES 100 #endif