On Wed, Nov 14, 2018 at 08:43:32AM -0600, Eric Blake wrote:
On 11/14/18 8:27 AM, Richard W.M. Jones wrote:
>+++ b/tests/test-lang-plugins.c
>@@ -49,6 +49,7 @@ main (int argc, char *argv[])
> {
> guestfs_h *g;
> int r;
>+ const char *s;
> char *data;
> /* These languages currently fail completely when run under
>@@ -56,7 +57,8 @@ main (int argc, char *argv[])
> */
> #pragma GCC diagnostic push
> #pragma GCC diagnostic ignored "-Wunused-result"
>- if (getenv ("NBDKIT_VALGRIND") != NULL &&
>+ s = getenv ("NBDKIT_VALGRIND");
>+ if (s && strcmp (s, "1") == 0 &&
> (strcmp (LANG, "python") == 0 ||
> strcmp (LANG, "ruby") == 0 ||
> strcmp (LANG, "tcl") == 0)) {
Do we still need the #pragma here?
TBH I'm not even sure why we had it before. Anyway I have removed it
and it doesn't look like there is any problem.
Series is looking good now.
Thanks for the review. I simplified the wrapper a little bit more by
removing ‘bool has_arg’ completely - which made the code shorter -
and pushed it.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/