Open Source Telephony
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: ofono@ofono.org
Subject: [PATCH] fix compilation on gcc-6.3
Date: Sat, 29 Dec 2018 23:24:30 +0100	[thread overview]
Message-ID: <20181229222430.GB28688@amd> (raw)
In-Reply-To: <20181229203046.GA1949@amd>

[-- Attachment #1: Type: text/plain, Size: 1038 bytes --]

gcc-6 fails to compile ofono due to #pragma directives. Limit them to
gcc versions where they are needed.

diff --git a/drivers/rilmodem/call-forwarding.c b/drivers/rilmodem/call-forwarding.c
index eb65c23..231a06c 100644
--- a/drivers/rilmodem/call-forwarding.c
+++ b/drivers/rilmodem/call-forwarding.c
@@ -37,7 +37,9 @@
 #include <ofono/call-forwarding.h>
 #include "common.h"
 
+#if __GNUC__ > 7
 #pragma GCC diagnostic ignored "-Wrestrict"
+#endif
 
 #include "gril.h"
 
diff --git a/drivers/rilmodem/network-registration.c b/drivers/rilmodem/network-registration.c
index 99c80bc..241ec5f 100644
--- a/drivers/rilmodem/network-registration.c
+++ b/drivers/rilmodem/network-registration.c
@@ -36,7 +36,9 @@
 #include <ofono/modem.h>
 #include <ofono/netreg.h>
 
+#if __GNUC__ > 7
 #pragma GCC diagnostic ignored "-Wrestrict"
+#endif
 
 #include <gril/gril.h>
 


-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  parent reply	other threads:[~2018-12-29 22:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-04  9:44 ofono fails to compile on gcc-6.3 Pavel Machek
2018-09-04 11:01 ` Giacinto Cifelli
2018-12-29  9:53 ` Trouble compiling ... " Pavel Machek
2018-12-29 20:20   ` Denis Kenzior
2018-12-29 20:30     ` Pavel Machek
2018-12-29 21:08       ` Denis Kenzior
2019-01-22 17:07         ` Marcel Holtmann
2018-12-29 22:24       ` Pavel Machek [this message]
2018-12-29 22:47         ` [PATCH] document getting of ell, point people at useful docs Pavel Machek
2019-01-14 11:17           ` Pavel Machek
2019-01-22 16:50           ` Marcel Holtmann
2019-02-01 22:25             ` Pavel Machek
2019-02-02 12:18               ` Marcel Holtmann
2019-01-22 17:03         ` [PATCH] fix compilation on gcc-6.3 Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181229222430.GB28688@amd \
    --to=pavel@ucw.cz \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox