mirror of https://gerrit.osmocom.org/libosmocore
vty/logging.h: wrap Wstrict-prototypes in Wpragma
When building osmo-pcu and osmo-trx with Werror, the build is currently failing at -Wstrict-prototypes. logging.h gets included in c++ code, and in c++ this is the default, so gcc warns about the option not being valid in c++. In file included from pcu_main.cpp:41: …/vty/logging.h:10:32: warning: option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [-Wpragmas] Related: https://stackoverflow.com/a/6699884 Change-Id: I9e069bb72856b437c142c11e67202e058e6eb3aa
This commit is contained in:
parent
be912e7c1d
commit
1bed5d8ee4
|
@ -7,11 +7,16 @@
|
|||
|
||||
struct log_info;
|
||||
#pragma GCC diagnostic push
|
||||
/* use -Wpragma, so the build doesn't fail in c++ files of osmo-pcu and
|
||||
* osmo-trx including this header with:
|
||||
* 'option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++' */
|
||||
#pragma GCC diagnostic ignored "-Wpragmas"
|
||||
#pragma GCC diagnostic ignored "-Wstrict-prototypes"
|
||||
/* note this undefined argument declaration is intentional. There used
|
||||
* to be an argument until 2017 which we no longer need .*/
|
||||
void logging_vty_add_cmds();
|
||||
#pragma GCC diagnostic pop
|
||||
#pragma GCC diagnostic pop
|
||||
void logging_vty_add_deprecated_subsys(void *ctx, const char *name);
|
||||
struct vty;
|
||||
struct log_target *osmo_log_vty2tgt(struct vty *vty);
|
||||
|
|
Loading…
Reference in New Issue