vty/logging.h: Avoid -Werror=pragmas error in C++ code

The newly-introdiced pragma to disable strict-prototypes checking works
in C, but creates a -Werror=pragmas error in C++ code:

In file included from osmo-trx.cpp:45:
/build/deps/install/stow/libosmocore/include/osmocom/vty/logging.h:10:32: error: option
‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [-Werror=pragmas]
 #pragma GCC diagnostic ignored "-Wstrict-prototypes"

So let's also suppress those errors for that one line of code...

Change-Id: I85596cf4538d7a8c522f4bce1620a2d19e2a910e
This commit is contained in:
Harald Welte 2022-11-06 17:04:45 +01:00
parent be912e7c1d
commit 8d5fc1db44
1 changed files with 1 additions and 0 deletions

View File

@ -7,6 +7,7 @@
struct log_info;
#pragma GCC diagnostic push
#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 .*/