lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] [PATCH] Simple fix for yet another clang warning in Boost code


From: Greg Chicares
Subject: Re: [lmi] [PATCH] Simple fix for yet another clang warning in Boost code
Date: Sun, 31 Jul 2016 23:35:37 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.8.0

On 2016-07-31 21:41, Vadim Zeitlin wrote:
> 
>  I think I haven't built lmi with clang since rate table stuff was added in
> 4f738399b2a45029ba1535cad186e0e4d5cda67e, but now that I try to do it I'm
> getting
> 
>       In file included from .../rate_table.cpp:33:
>       In file included from .../3rdparty/boost_1_33_1/boost/optional.hpp:15:
>       .../3rdparty/boost_1_33_1/boost/optional/optional.hpp:668:34: error: 
> unused parameter 'x' [-Werror,-Wunused-parameter]
>       bool operator == ( none_t const& x, optional<T> const& y )
>                                        ^
[...]
> and the build fails. I don't understand why doesn't g++ give the same
> warning because the parameter is clearly unused, but it seems logical that
> clang does, so I'd like to fix this by locally disabling this warning for
> it as done by https://github.com/vadz/lmi/pull/45

I just now pushed this change, and with the recent 'git-multimail' change
we get a real "Subject:":
  http://lists.nongnu.org/archive/html/lmi-commits/2016-07/index.html

>  The only alternative would be to patch Boost headers to remove the
> "none_t" parameter name, please let me know if you think this would be
> preferable.

I agree that that's not better. We should obviate boost as much as
possible by using the C++11 standard library instead, and then maybe
we'll eventually be able to use a more recent version of boost for
whatever hasn't been standardized.

In 'workhorse.make' we already have:
  # Boost didn't remove an unused parameter in this file:
  operations_posix_windows.o: gcc_common_extra_warnings += -Wno-unused-parameter
and we didn't work around that by patching. Of course, that workaround
can't be used to fix mistakes in headers, and exempting 'rate_table.cpp'
from that warning is too cavalier.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]