Add virXMLValidateAgainstSchema helper method
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hello,
Review
Quoted 3 lines · Daniel P. Berrange
(quoted diff) +3
-0+# define VIR_WARNINGS_NO_PRINTF \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=format\"")
Xen automated tests are failing to build on all architectures with:
util/virxml.c: In function 'catchRNGError':
util/virxml.c:1094:9: error: unknown option after '#pragma GCC diagnostic' kind [-Werror=pragmas]
which I think must be down to one of these additions.
(helpful of gcc not to print the unknown option in question!)
test overview:
http://www.chiark.greenend.org.uk/~xensrcts/logs/33443/
specific failure log:
http://www.chiark.greenend.org.uk/~xensrcts/logs/33443/build-amd64-libvirt/5.ts-libvirt-build.log
We use Debian Wheezy's gcc, which is 4.6.3 AFAIK.
Cheers,
Ian.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 14 lines · Ian Campbell
Hello,
Review
Quoted 3 lines · Daniel P. Berrange
(quoted diff) +3
-0+# define VIR_WARNINGS_NO_PRINTF \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=format\"")Xen automated tests are failing to build on all architectures with:
util/virxml.c: In function 'catchRNGError':
util/virxml.c:1094:9: error: unknown option after '#pragma GCC diagnostic' kind [-Werror=pragmas]which I think must be down to one of these additions.
Quoted 8 lines
(helpful of gcc not to print the unknown option in question!)
test overview:
http://www.chiark.greenend.org.uk/~xensrcts/logs/33443/
specific failure log:
http://www.chiark.greenend.org.uk/~xensrcts/logs/33443/build-amd64-libvirt/5.ts-libvirt-build.logWe use Debian Wheezy's gcc, which is 4.6.3 AFAIK.
The configure logs show
checking whether C compiler handles -Wsuggest-attribute=const... yes checking whether C compiler handles -Wsuggest-attribute=format... no checking whether C compiler handles -Wsuggest-attribute=noreturn... yes checking whether C compiler handles -Wsuggest-attribute=pure... yes
So, can someone with a Debian machine check if it helps to modify
_Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=format\"")
To be just
_Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute\"")
THough, I guess some very old gcc might not support -Wsuggest-attribute at all, so perhaps we need to check this fully
Regards,
Daniel
Signature · 4 lines
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 31 lines · Daniel P. Berrange
Quoted 14 lines · Ian Campbell
Hello,
Review
Quoted 3 lines · Daniel P. Berrange
(quoted diff) +3
-0+# define VIR_WARNINGS_NO_PRINTF \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=format\"")Xen automated tests are failing to build on all architectures with:
util/virxml.c: In function 'catchRNGError':
util/virxml.c:1094:9: error: unknown option after '#pragma GCC diagnostic' kind [-Werror=pragmas]which I think must be down to one of these additions.
Quoted 8 lines
(helpful of gcc not to print the unknown option in question!)
test overview:
http://www.chiark.greenend.org.uk/~xensrcts/logs/33443/
specific failure log:
http://www.chiark.greenend.org.uk/~xensrcts/logs/33443/build-amd64-libvirt/5.ts-libvirt-build.logWe use Debian Wheezy's gcc, which is 4.6.3 AFAIK.
The configure logs show
checking whether C compiler handles -Wsuggest-attribute=const... yes checking whether C compiler handles -Wsuggest-attribute=format... no checking whether C compiler handles -Wsuggest-attribute=noreturn... yes checking whether C compiler handles -Wsuggest-attribute=pure... yes
Quoted 7 lines
So, can someone with a Debian machine check if it helps to modify
_Pragma("GCC diagnostic ignored \"-Wsuggest-attribute=format\"")To be just
_Pragma("GCC diagnostic ignored \"-Wsuggest-attribute\"")
I'm afraid it doesn't seem to. Specifically:
diff --git a/src/internal.h b/src/internal.h
index 9855c49..508f8b5 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -236,7 +236,7 @@
_Pragma ("GCC diagnostic ignored \"-Wcast-align\"")
# define VIR_WARNINGS_NO_PRINTF \
_Pragma ("GCC diagnostic push") \
- _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=format\"")
+ _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute\"")
# define VIR_WARNINGS_RESET \
_Pragma ("GCC diagnostic pop")Didn't help.
According to
https://gcc.gnu.org/onlinedocs/gcc-4.6.3/gcc/Warning-Options.html#Warning-Options the valid -Wsuggest-attributes=FOO in that version are pure const and noreturn.
=format seems to have arrived in 4.8, FWIW.
Ian.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 55 lines · Ian Campbell
Quoted 31 lines · Daniel P. Berrange
Quoted 14 lines · Ian Campbell
Hello,
Review
Quoted 3 lines · Daniel P. Berrange
(quoted diff) +3
-0+# define VIR_WARNINGS_NO_PRINTF \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=format\"")Xen automated tests are failing to build on all architectures with:
util/virxml.c: In function 'catchRNGError':
util/virxml.c:1094:9: error: unknown option after '#pragma GCC diagnostic' kind [-Werror=pragmas]which I think must be down to one of these additions.
Quoted 8 lines
(helpful of gcc not to print the unknown option in question!)
test overview:
http://www.chiark.greenend.org.uk/~xensrcts/logs/33443/
specific failure log:
http://www.chiark.greenend.org.uk/~xensrcts/logs/33443/build-amd64-libvirt/5.ts-libvirt-build.logWe use Debian Wheezy's gcc, which is 4.6.3 AFAIK.
The configure logs show
checking whether C compiler handles -Wsuggest-attribute=const... yes checking whether C compiler handles -Wsuggest-attribute=format... no checking whether C compiler handles -Wsuggest-attribute=noreturn... yes checking whether C compiler handles -Wsuggest-attribute=pure... yes
Quoted 7 lines
So, can someone with a Debian machine check if it helps to modify
_Pragma("GCC diagnostic ignored \"-Wsuggest-attribute=format\"")To be just
_Pragma("GCC diagnostic ignored \"-Wsuggest-attribute\"")I'm afraid it doesn't seem to. Specifically:
diff --git a/src/internal.h b/src/internal.h index 9855c49..508f8b5 100644 --- a/src/internal.h +++ b/src/internal.h @@ -236,7 +236,7 @@ _Pragma ("GCC diagnostic ignored \"-Wcast-align\"") # define VIR_WARNINGS_NO_PRINTF \ _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=format\"") + _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute\"") # define VIR_WARNINGS_RESET \ _Pragma ("GCC diagnostic pop")
Quoted 6 lines
Didn't help.
According to
https://gcc.gnu.org/onlinedocs/gcc-4.6.3/gcc/Warning-Options.html#Warning-Options the valid -Wsuggest-attributes=FOO in that version are pure const and noreturn.=format seems to have arrived in 4.8, FWIW.
I just copied you on an alternative patch that would hopefully fix it - I explicitly check if suggest-attribute=format exists in the gcc version used.
Regards,
Daniel
Signature · 4 lines
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|