Menu

#103 Compile warnings from boost headers with clang and boost 1.58.0

Fuego 2.0
new
None
2015-05-29
2015-05-29
No

There is a small number of boost header files which cause -Wunused-parameter warnings in Fuego when building with clang. The attached patch gets rid of them by temporarily disabling the warning when including the boost header files boost/format.hpp and boost/thread.hpp. But the patch is intrusive and changes six Fuego files. Does anyone have a better solution?

1 Attachments

Discussion

  • Martin Müller

    Martin Müller - 2015-05-29

    Updated patch

     
  • Martin Müller

    Martin Müller - 2015-05-29

    One other solution would be to have some wrapper header files, e.g.:
    boostwrapper/format.hpp would have the code:

    if defined(clang)

    pragma clang diagnostic push

    pragma clang diagnostic ignored "-Wunused-parameter"

    endif

    include <boost format.hpp="">

    if defined(clang)

    pragma clang diagnostic pop

    endif

    And then in Fuego we do

    include "boostwrapper/format.hpp"

    instead of

    include <boost format.hpp="">

    Also not great, but no code duplication this way.
    Any comments?
    Martin

     

    Last edit: Martin Müller 2015-05-29

Log in to post a comment.