Boost C++ Libraries: Ticket #7049: "unreferenced parameter" warning https://svn.boost.org/trac10/ticket/7049 <p> There is an unreferenced parameter which results in a compiler-warning at the following location: </p> <p> File: "boost/program_options/errors.hpp" Line: 253 Function: "set_option_name" </p> <p> The parameter "option_name" is not referenced which results in the following compiler-warning in Visual Studio 2010 when compiling one's code using program_options: </p> <p> ".../boost/program_options/errors.hpp(253): warning C4100: 'option_name' : unreferenced formal parameter" </p> <p> (In other compilers a similar warning will probably occur.) </p> <p> A small patch which fixes the problem is attached. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7049 Trac 1.4.3 Deniz Bahadir <D.Bahadir@…> Fri, 29 Jun 2012 07:53:47 GMT attachment set https://svn.boost.org/trac10/ticket/7049 https://svn.boost.org/trac10/ticket/7049 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">errors.hpp.patch</span> </li> </ul> <p> Patch that fixes the "unreferenced parameter" warning. </p> Ticket Vladimir Prus Fri, 29 Jun 2012 09:04:12 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/7049#comment:1 https://svn.boost.org/trac10/ticket/7049#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/79164" title="Fix compilation error. Fixes #7049. Patch from Deniz Bahadir. ">[79164]</a>) Fix compilation error. </p> <p> Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7049" title="#7049: Bugs: &#34;unreferenced parameter&#34; warning (closed: fixed)">#7049</a>. Patch from Deniz Bahadir. </p> Ticket garren@… Fri, 13 Jul 2012 16:13:27 GMT <link>https://svn.boost.org/trac10/ticket/7049#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7049#comment:2</guid> <description> <p> I also find this problem with gcc when using "-Werror -Wall -Wextra". Have just checked the trunk and it appears that the patch didn't quite work. The line in question (253) is still: </p> <p> virtual void set_option_name(const std::string&amp;option_name) {} </p> <p> My solution was to simply remove "option_name" from this line. </p> </description> <category>Ticket</category> </item> <item> <author>Deniz Bahadir <D.Bahadir@…></author> <pubDate>Fri, 13 Jul 2012 16:44:19 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7049#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7049#comment:3</guid> <description> <p> @garren: You are right. Actually my patch should change the line into: </p> <pre class="wiki">virtual void set_option_name(const std::string&amp; /* option_name */){} </pre><p> Either my patch-file had the wrong format, or something got mixed up while patching. At least, this is what it should look like. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Vladimir Prus</dc:creator> <pubDate>Fri, 13 Jul 2012 19:06:32 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7049#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7049#comment:4</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/79477" title="Really fixes #7049. ">[79477]</a>) Really fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7049" title="#7049: Bugs: &#34;unreferenced parameter&#34; warning (closed: fixed)">#7049</a>. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Vladimir Prus</dc:creator> <pubDate>Sun, 20 Jan 2013 07:13:59 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7049#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7049#comment:5</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/82556" title="Merge: Really fixes #7049. ">[82556]</a>) Merge: Really fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7049" title="#7049: Bugs: &#34;unreferenced parameter&#34; warning (closed: fixed)">#7049</a>. </p> </description> <category>Ticket</category> </item> </channel> </rss>