<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div class="" style="word-wrap:break-word">Dear Pascale,
<div class="">
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Most of these can be safely ignored (those relating to -Wreturn-type), but I admit it looks a bit nasty… And unfortunately hid a slightly more important warning for my eyes:</div>
<div class=""><br class="">
</div>
<div class="">The warning about -Wunused-value at the line if(i==0)par3-14.27; indicates that there should have been an assignment inside - I am guessing it should have read if(i==0)par3-=14.27; - What do you think Troels? </div>
<div class=""><br class="">
</div>
<div class="">As far as I can see, this bug only affects the i==0 setting corresponding the 5 degree beamport_angle setting… (Which I am guessing you are after for your instrument Pascale… :-( )</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">All of the above has (now) been fixed in our GitHub repository - the two affected files are also attached here… - Should be put either your working directory or in the share/ directory of your McStas 2.2a.</div>
<div class=""><br class="">
</div>
<div class="">At some non-decided point I will release a source bundle with these fixes, also including a version that runs with the legacy McStas 1.12c...</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Best and sorry for the inconvenience,</div>
<div class=""><br class="">
</div>
<div class="">Peter</div>
<div class="">- On paternity leave until August :-)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span></div>
<div class=""></div>
</div>
</div>
<div style="word-wrap:break-word">
<div>
<div></div>
</div>
</div>
<div class="" style="word-wrap:break-word">
<div class="">
<div class=""></div>
<div class=""><br class="">
</div>
<div class="">
<div>
<blockquote type="cite" class="">
<div class="">On 11 Jun 2015, at 15:27 , Pascale Deen <<a href="mailto:pascale.deen@esss.se" class="">pascale.deen@esss.se</a>> wrote:</div>
<br class="x_Apple-interchange-newline">
<div class="">
<div class="" style="word-wrap:break-word">Hello,
<div class="">I am trying to run the moderator component </div>
<div class=""><br class="">
</div>
<div class="">
<div class="">
<div class="">COMPONENT ESS_Source = ESS_moderator(</div>
<div class=""> isleft = 0.9, Lmin = 0.5, Lmax = 10, cold_frac = 0.5,</div>
<div class=""> dist = 2, focus_xw = 0.2, focus_yh = 0.2, yheight_c = 0.03,</div>
<div class=""> yheight_t = 0.03, n_pulses = 1, beamport_angle = 5,</div>
<div class=""> sourcedef = "2015", extraction_opening = 120)</div>
<div class=""> AT (0, 0, -0.1) RELATIVE Origin</div>
<div class=""><br class="">
</div>
</div>
</div>
<div class="">but I get the following warnings: </div>
<div class="">
<div class=""><font color="#0056d6" class="">/Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:409:1: warning: control reaches end of non-void function [-Wreturn-type]</font></div>
<div class=""><font color="#0056d6" class="">} /* end of ESS_Mezei_cold_2012 */</font></div>
<div class=""><font color="#0056d6" class="">^</font></div>
<div class=""><font color="#0056d6" class="">/Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:517:1: warning: control reaches end of non-void function [-Wreturn-type]</font></div>
<div class=""><font color="#0056d6" class="">} /* end of ESS_Mezei_cold */</font></div>
<div class=""><font color="#0056d6" class="">^</font></div>
<div class=""><font color="#0056d6" class="">/Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:622:1: warning: control reaches end of non-void function [-Wreturn-type]</font></div>
<div class=""><font color="#0056d6" class="">} /* end of ESS_Mezei_thermal */</font></div>
<div class=""><font color="#0056d6" class="">^</font></div>
<div class=""><font color="#0056d6" class="">/Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:639:1: warning: control reaches end of non-void function [-Wreturn-type]</font></div>
<div class=""><font color="#0056d6" class="">} /* end of ESS_2012_Lieutenant_cold */</font></div>
<div class=""><font color="#0056d6" class="">^</font></div>
<div class=""><font color="#0056d6" class="">/Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:693:1: warning: control may reach end of non-void function [-Wreturn-type]</font></div>
<div class=""><font color="#0056d6" class="">} /* end of ESS_2013_Schoenfeldt_cold */</font></div>
<div class=""><font color="#0056d6" class="">^</font></div>
<div class=""><font color="#0056d6" class="">/Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:719:1: warning: control may reach end of non-void function [-Wreturn-type]</font></div>
<div class=""><font color="#0056d6" class="">} /* end of ESS_2014_Schoenfeldt_cold */</font></div>
<div class=""><font color="#0056d6" class="">^</font></div>
<div class=""><font color="#0056d6" class="">/Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:851:1: warning: control may reach end of non-void function [-Wreturn-type]</font></div>
<div class=""><font color="#0056d6" class="">} /* end of ESS_2013_Schoenfeldt_thermal */</font></div>
<div class=""><font color="#0056d6" class="">^</font></div>
<div class=""><font color="#0056d6" class="">/Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:871:1: warning: control may reach end of non-void function [-Wreturn-type]</font></div>
<div class=""><font color="#0056d6" class="">} /* end of ESS_2014_Schoenfeldt_thermal */</font></div>
<div class=""><font color="#0056d6" class="">^</font></div>
<div class=""><font color="#0056d6" class="">/Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:894:1: warning: control may reach end of non-void function [-Wreturn-type]</font></div>
<div class=""><font color="#0056d6" class="">} /* end of ESS_2015_Schoenfeldt_thermal */</font></div>
<div class=""><font color="#0056d6" class="">^</font></div>
<div class=""><font color="#0056d6" class="">/Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:922:1: warning: control may reach end of non-void function [-Wreturn-type]</font></div>
<div class=""><font color="#0056d6" class="">} /* end of ESS_2015_Schoenfeldt_cold */</font></div>
<div class=""><font color="#0056d6" class="">^</font></div>
<div class=""><font color="#0056d6" class="">/Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:959:17: warning: expression result unused [-Wunused-value]</font></div>
<div class=""><font color="#0056d6" class=""> if(i==0)par3-14.27;</font></div>
<div class=""><font color="#0056d6" class=""> ~~~~^~~~~~</font></div>
<div class=""><font color="#0056d6" class="">11 warnings generated.</font></div>
<div class="">
<div class="" style="letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px; word-wrap:break-word">
<span class="x_Apple-style-span" style="border-collapse:separate; border-spacing:0px">
<div class="" style="word-wrap:break-word"><span class="x_Apple-style-span" style="border-collapse:separate; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:2; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; border-spacing:0px">
<div class="" style="word-wrap:break-word"><span class="x_Apple-style-span" style="border-collapse:separate; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:2; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; border-spacing:0px">
<div class="" style="word-wrap:break-word"><span class="x_Apple-style-span" style="border-collapse:separate; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:2; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; border-spacing:0px">
<div class="" style="word-wrap:break-word"><span class="x_Apple-style-span" style="border-collapse:separate; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:2; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; border-spacing:0px">
<div class="" style="word-wrap:break-word"><span class="x_Apple-style-span" style="border-collapse:separate; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:2; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; border-spacing:0px">
<div class="" style="word-wrap:break-word"><span class="x_Apple-style-span" style="border-collapse:separate; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:2; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; border-spacing:0px">
<div class="" style="word-wrap:break-word">
<div class="" style="font-family:Helvetica"><span class="x_Apple-style-span" style="border-collapse:separate; border-spacing:0px">
<div class="" style="word-wrap:break-word"><span class="x_Apple-style-span" style="border-collapse:separate; border-spacing:0px">
<div class="" style="word-wrap:break-word"><span class="x_Apple-style-span" style="border-collapse:separate; border-spacing:0px">
<div class="" style="word-wrap:break-word"><span class="x_Apple-style-span" style="border-collapse:separate; border-spacing:0px">
<div class="" style="word-wrap:break-word"><span class="x_Apple-style-span" style="border-collapse:separate; border-spacing:0px">
<div class="" style="word-wrap:break-word"><span class="x_Apple-style-span" style="border-collapse:separate; border-spacing:0px">
<div class="" style="word-wrap:break-word"><span class="x_Apple-style-span" style="border-collapse:separate; border-spacing:0px">
<div class="" style="word-wrap:break-word"><span class="x_Apple-style-span" style="border-collapse:separate; border-spacing:0px">
<div class="" style="word-wrap:break-word"><span class="x_Apple-style-span" style="border-collapse:separate; border-spacing:0px">
<div class="" style="word-wrap:break-word"><span class="x_Apple-style-span" style="border-collapse:separate; border-spacing:0px">
<div class="" style="word-wrap:break-word"><span class="x_Apple-style-span" style="border-collapse:separate; border-spacing:0px">
<div class="" style="word-wrap:break-word"><span class="x_Apple-style-span" style="border-collapse:separate; border-spacing:0px">
<div class="" style="word-wrap:break-word">
<div class="">----------------------------------------------------</div>
<div class="">
<div class=""><b class=""><font class="x_Apple-style-span" color="#00426C"><font class="x_Apple-style-span" face="Tahoma" style="font-size:11px">Pascale Deen</font></font></b></div>
<div class=""><font class="x_Apple-style-span" color="#00426C" face="Tahoma" style="font-size:11px">Instrument Scientist - Chopper Spectrometry</font></div>
</div>
</div>
</span></div>
</span></div>
</span></div>
</span></div>
</span></div>
</span><span class="" style="font-size:11px"><span class="x_Apple-style-span" style="font-family:Tahoma; color:rgb(0,66,108)">European Spallation Source ESS AB</span><span class="x_Apple-style-span" style="border-collapse:separate; border-spacing:0px">
<div class="" style="word-wrap:break-word"><span class="x_Apple-style-span" style="border-collapse:separate; border-spacing:0px">
<div class="" style="word-wrap:break-word"><span class="x_Apple-style-span" style="border-collapse:separate; border-spacing:0px">
<div class="" style="word-wrap:break-word"><span class="x_Apple-style-span" style="border-collapse:separate; border-spacing:0px">
<div class="" style="word-wrap:break-word"><span class="x_Apple-style-span" style="border-collapse:separate; border-spacing:0px">
<div class="" style="word-wrap:break-word"><span class="x_Apple-style-span" style="border-collapse:separate; border-spacing:0px">
<div class="" style="word-wrap:break-word">
<div class=""><font class="x_Apple-style-span" face="Tahoma"><font class="x_Apple-style-span" color="#00426C">P.O Box 176, SE-221 00 Lund, Sweden</font></font></div>
<div class=""><font class="x_Apple-style-span" face="Tahoma"><font class="x_Apple-style-span" color="#00426C">Visiting address: Tunavägen 24 Lund</font></font></div>
<div class=""><font class="x_Apple-style-span" color="#00426c" face="Tahoma"><br class="">
</font></div>
</div>
</span></div>
</span></div>
</span></div>
</span></div>
</span></div>
</span><span class="x_Apple-style-span" style="font-family:Tahoma; color:rgb(0,66,108)">Adjunct Associate Professor </span></span>
<div class=""><font class="x_Apple-style-span" color="#00426c" style="font-size:11px">Niels Bohr Institute </font></div>
<div class=""><font class="x_Apple-style-span" color="#00426c" style="font-size:11px">University of Copenhagen</font></div>
<div class=""><font class="x_Apple-style-span" color="#00426c" face="Tahoma" size="2"><br class="">
</font></div>
<span class="x_Apple-style-span" style="border-collapse:separate; border-spacing:0px">
<div class="" style="word-wrap:break-word"><span class="x_Apple-style-span" style="border-collapse:separate; border-spacing:0px">
<div class="" style="word-wrap:break-word"><span class="x_Apple-style-span" style="border-collapse:separate; border-spacing:0px">
<div class="" style="word-wrap:break-word"><span class="x_Apple-style-span" style="border-collapse:separate; border-spacing:0px">
<div class="" style="word-wrap:break-word"><span class="x_Apple-style-span" style="border-collapse:separate; border-spacing:0px">
<div class="" style="word-wrap:break-word"><span class="x_Apple-style-span" style="border-collapse:separate; border-spacing:0px">
<div class="" style="word-wrap:break-word">
<div class=""><font class="x_Apple-style-span" face="Tahoma"><font class="x_Apple-style-span" color="#00426C" style="font-size:11px">Mobile: +46 721 792 079</font></font></div>
<div class=""><font class="x_Apple-style-span" color="#00426C" face="Tahoma" style="font-size:11px">Phone: +46 46 888 3079</font></div>
<div class=""><font class="x_Apple-style-span" face="Tahoma"><font class="x_Apple-style-span" color="#00426C" style="font-size:11px">E-mail:
<a href="mailto:pascale.deen@esss.se" class="">pascale.deen@esss.se</a></font></font></div>
<div class=""><font class="x_Apple-style-span" face="Tahoma"><font class="x_Apple-style-span" color="#00426C"><font class="x_Apple-style-span" size="2"><span class="x_Apple-style-span" style="font-size:10px"><br class="">
</span></font></font></font></div>
<div class=""><font class="x_Apple-style-span" face="Tahoma"><font class="x_Apple-style-span" color="#00426C"><font class="x_Apple-style-span" size="2"><span class="x_Apple-style-span" style="font-size:10px"><a href="http://www.esss.se/" class="">www.esss.se</a></span></font></font></font></div>
<div class=""><font class="x_Apple-style-span" face="Tahoma"><font class="x_Apple-style-span" color="#00426C"><font class="x_Apple-style-span" size="2"><br class="">
</font></font></font></div>
<div class=""><font class="x_Apple-style-span" face="Tahoma"><font class="x_Apple-style-span" color="#00426C"><font class="x_Apple-style-span" size="2">The European Spallation Source is a Partnership of 16 European Nations committed to the goal of collectively
building and operating the world's leading facility for research using neutrons by the second quarter of the 21st Century</font></font></font></div>
</div>
</span></div>
</span></div>
</span></div>
</span></div>
</span></div>
</span></div>
</span></div>
</span></div>
</span></div>
</span></div>
</span></div>
</span></div>
</div>
</span></div>
</span></div>
</span></div>
</span></div>
</span></div>
</span></div>
</span></div>
</div>
<br class="">
</div>
</div>
_______________________________________________<br class="">
mcstas-users mailing list<br class="">
<a href="mailto:mcstas-users@mcstas.org" class="">mcstas-users@mcstas.org</a><br class="">
http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</body>
</html>