<HTML>
<HEAD>
<TITLE>Re: [Freeswitch-users] Compile error with FreeSwitch 1.2.11</TITLE>
</HEAD>
<BODY>
<FONT FACE="Monaco, Courier New"><SPAN STYLE='font-size:11pt'>You should open a jira (<a href="http://jira.freeswitch.org">http://jira.freeswitch.org</a>) with this<BR>
<BR>
<BR>
On 7/22/13 2:10 AM, "Markus von Arx" <<a href="mkvonarx@gmail.com">mkvonarx@gmail.com</a>> wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><SPAN STYLE='font-size:11pt'><FONT FACE="Arial">Hi<BR>
<BR>
I tried to update to FreeSwitch 1.2.11 but get the following compile error (I'm compiling on Windows with Visual Studio 2012 Update 3):<BR>
d:\freeswitch\build\freeswitch-1.2.11\src\switch_ivr_async.c(1207): error C2220: warning treated as error - no 'object' file generated [D:\FreeSwitch\Build\freeswitch-1.2.11\w32\Library\FreeSwitchCore.2012.vcxproj]<BR>
d:\freeswitch\build\freeswitch-1.2.11\src\switch_ivr_async.c(1207): warning C4701: potentially uninitialized local variable 'len' used [D:\FreeSwitch\Build\freeswitch-1.2.11\w32\Library\FreeSwitchCore.2012.vcxproj]<BR>
<BR>
Checking the source code of switch_ivr_async.c I think the compiler is correct. In the source code, the lines 1213-1214 that contain the initialization of 'len' should probably be moved to line 1204.<BR>
<BR>
</FONT><FONT FACE="Monaco, Courier New">Also, the latest version of the file on github (<a href="https://github.com/FreeSWITCH/FreeSWITCH/blob/master/src/switch_ivr_async.c">https://github.com/FreeSWITCH/FreeSWITCH/blob/master/src/switch_ivr_async.c</a>) looks exactly like this (fixed with a commit from 3 July 2013: <a href="https://github.com/FreeSWITCH/FreeSWITCH/commit/02046950bebf84b6cf56f27321c3427718037c6b">https://github.com/FreeSWITCH/FreeSWITCH/commit/02046950bebf84b6cf56f27321c3427718037c6b</a>).<BR>
<BR>
</FONT><FONT FACE="Arial">=> What to do now with the 1.2.11 version? Will there be a 1.2.12 that fixes this compiler error?<BR>
<BR>
Here are the offending lines of code:<BR>
1136: static switch_bool_t record_callback(switch_media_bug_t *bug, void *user_data, switch_abc_type_t type)<BR>
...<BR>
1143: switch_size_t len;<BR>
...<BR>
1199: case SWITCH_ABC_TYPE_TAP_NATIVE_WRITE:<BR>
1200: {<BR>
1201: switch_time_t now = switch_micro_time_now();<BR>
1202: switch_time_t diff;<BR>
1203: rh->wready = 1;<BR>
1204: <BR>
1205: if (!rh->rready) {<BR>
1206: unsigned char fill_data[SWITCH_RECOMMENDED_BUFFER_SIZE] = {0};<BR>
1207: switch_size_t fill_len = len;<BR>
1208: switch_core_gen_encoded_silence(fill_data, &rh->read_impl, len);<BR>
1209: switch_core_file_write(&rh->in_fh, fill_data, &fill_len);<BR>
1210: }<BR>
1211:<BR>
1212:<BR>
1213: nframe = switch_core_media_bug_get_native_write_frame(bug);<BR>
1214: len = nframe->datalen;<BR>
...<BR>
<BR>
Regards, Markus<BR>
<BR>
</FONT><FONT FACE="Monaco, Courier New"><BR>
<HR ALIGN=CENTER SIZE="3" WIDTH="95%"></FONT></SPAN><FONT SIZE="2"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'>_________________________________________________________________________<BR>
Professional FreeSWITCH Consulting Services:<BR>
<a href="consulting@freeswitch.org">consulting@freeswitch.org</a><BR>
<a href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a><BR>
<BR>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<BR>
<a href="http://www.cudatel.com">http://www.cudatel.com</a><BR>
<BR>
Official FreeSWITCH Sites<BR>
<a href="http://www.freeswitch.org">http://www.freeswitch.org</a><BR>
<a href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a><BR>
<a href="http://www.cluecon.com">http://www.cluecon.com</a><BR>
<BR>
FreeSWITCH-users mailing list<BR>
<a href="FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><BR>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><BR>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><BR>
<a href="http://www.freeswitch.org">http://www.freeswitch.org</a><BR>
</SPAN></FONT></FONT></BLOCKQUOTE><FONT SIZE="2"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'><BR>
</SPAN></FONT></FONT><FONT FACE="Monaco, Courier New"><SPAN STYLE='font-size:11pt'>-- <BR>
Ken<BR>
<FONT COLOR="#0000FF"><U><a href="http://www.FreeSWITCH.org">http://www.FreeSWITCH.org</a><BR>
<a href="http://www.ClueCon.com">http://www.ClueCon.com</a><BR>
<a href="http://www.OSTAG.org">http://www.OSTAG.org</a><BR>
</U></FONT>irc.freenode.net #freeswitch<BR>
</SPAN></FONT>
</BODY>
</HTML>