laforge submitted this change.

View Change

Approvals: Jenkins Builder: Verified osmith: Looks good to me, approved; Verified
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
---
M include/osmocom/vty/logging.h
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/include/osmocom/vty/logging.h b/include/osmocom/vty/logging.h
index 9be96e5..b3ce92c 100644
--- a/include/osmocom/vty/logging.h
+++ b/include/osmocom/vty/logging.h
@@ -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 .*/

To view, visit change 30048. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I85596cf4538d7a8c522f4bce1620a2d19e2a910e
Gerrit-Change-Number: 30048
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge@osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: osmith <osmith@sysmocom.de>
Gerrit-MessageType: merged