summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorPavel Hrdina <phrdina@redhat.com>2016-04-10 18:21:13 +0200
committerPavel Hrdina <phrdina@redhat.com>2016-04-11 12:09:11 +0200
commit7fb81831fc497aa4a34fdfc036be9c9ae4401084 (patch)
tree026e405e922b0a6cb5156eb500ff42a45c31f652 /src/util
parent16b41728b59a7188f643937303e3aec4c299a980 (diff)
downloadlibvirt-7fb81831fc497aa4a34fdfc036be9c9ae4401084.tar.gz
build: cleanup GCC < 4.6 -Wlogical-op workaround
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Diffstat (limited to 'src/util')
-rw-r--r--src/util/virbuffer.c11
-rw-r--r--src/util/virstring.c9
-rw-r--r--src/util/virsysinfo.c13
3 files changed, 6 insertions, 27 deletions
diff --git a/src/util/virbuffer.c b/src/util/virbuffer.c
index 43cd1a7175..d582e7dbec 100644
--- a/src/util/virbuffer.c
+++ b/src/util/virbuffer.c
@@ -417,14 +417,9 @@ virBufferVasprintf(virBufferPtr buf, const char *format, va_list argptr)
buf->use += count;
}
-/* Work around spurious strchr() diagnostics given by -Wlogical-op
- * for gcc < 4.6. Doing it via a local pragma keeps the damage
- * smaller than disabling it on the package level. Unfortunately, the
- * affected GCCs don't allow diagnostic push/pop which would have
- * further reduced the impact. */
-#if BROKEN_GCC_WLOGICALOP
-# pragma GCC diagnostic ignored "-Wlogical-op"
-#endif
+
+VIR_WARNINGS_NO_WLOGICALOP_STRCHR
+
/**
* virBufferEscapeString:
diff --git a/src/util/virstring.c b/src/util/virstring.c
index 7ec42aa189..2d7fbf3eb4 100644
--- a/src/util/virstring.c
+++ b/src/util/virstring.c
@@ -989,14 +989,7 @@ virStringHasControlChars(const char *str)
}
-/* Work around spurious strchr() diagnostics given by -Wlogical-op
- * for gcc < 4.6. Doing it via a local pragma keeps the damage
- * smaller than disabling it on the package level. Unfortunately, the
- * affected GCCs don't allow diagnostic push/pop which would have
- * further reduced the impact. */
-#if BROKEN_GCC_WLOGICALOP
-# pragma GCC diagnostic ignored "-Wlogical-op"
-#endif
+VIR_WARNINGS_NO_WLOGICALOP_STRCHR
/**
diff --git a/src/util/virsysinfo.c b/src/util/virsysinfo.c
index 05d33a8ce2..e8dbd4d01a 100644
--- a/src/util/virsysinfo.c
+++ b/src/util/virsysinfo.c
@@ -428,17 +428,8 @@ virSysinfoRead(void)
#elif defined(__s390__) || defined(__s390x__)
-/*
- we need to ignore warnings about strchr caused by -Wlogical-op
- for some GCC versions.
- Doing it via a local pragma keeps the damage smaller than
- disabling it on the package level.
- Unfortunately, the affected GCCs don't allow diagnostic push/pop
- which would have further reduced the impact.
- */
-# if BROKEN_GCC_WLOGICALOP
-# pragma GCC diagnostic ignored "-Wlogical-op"
-# endif
+
+VIR_WARNINGS_NO_WLOGICALOP_STRCHR
static char *
virSysinfoParseDelimited(const char *base, const char *name, char **value,