From: Matthew Fernandez Date: Sat, 19 Feb 2022 21:04:13 +0000 (-0800) Subject: fix 'gvpr' usage output X-Git-Tag: 3.0.0~19^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2fef8a589d0812b4284d3579137f971816d89acc;p=graphviz fix 'gvpr' usage output Commit 83eea6075b8f4746d632a792b1d1b97c19797acb altered the calling convention of `errorv`, but failed to take into account that the local variable `s` was being used for something else prior to its use as the first unpacked parameter. Following this commit, the first parameter was being discarded as `s` was overwritten with `error_info.id` or `id`. This fix restores the previous behavior. --- diff --git a/CHANGELOG.md b/CHANGELOG.md index 7db870ba9..a44c7aad0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -104,6 +104,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Gvedit on macOS now understands the `-?` help command line argument - CMAKE_LIBRARY_PATH is not honored #1973 - assert failure with `nslimit1=0` #1902 +- `gvpr` usage output has been restored. This was a regression in Graphviz + 2.46.0. ## [2.50.0] – 2021-12-04 diff --git a/lib/ast/error.c b/lib/ast/error.c index 81e04573e..13d28a0fb 100644 --- a/lib/ast/error.c +++ b/lib/ast/error.c @@ -50,11 +50,12 @@ void errorv(const char *id, int level, const char *s, va_list ap) flags = level & ~ERROR_LEVEL; level &= ERROR_LEVEL; } - if (level && ((s = error_info.id) || (s = id))) { + const char *prefix; + if (level && ((prefix = error_info.id) || (prefix = id))) { if (flags & ERROR_USAGE) - sfprintf(sfstderr, "Usage: %s ", s); + sfprintf(sfstderr, "Usage: %s ", prefix); else - sfprintf(sfstderr, "%s: ", s); + sfprintf(sfstderr, "%s: ", prefix); } if (flags & ERROR_USAGE) /*nop */ ; diff --git a/rtest/test_regression.py b/rtest/test_regression.py index 908358529..f6144c5f0 100644 --- a/rtest/test_regression.py +++ b/rtest/test_regression.py @@ -1537,7 +1537,6 @@ def test_bitarray(): _, _ = run_c(src, cflags=cflags) -@pytest.mark.xfail(strict=True) # FIXME @pytest.mark.skipif(shutil.which("gvpr") is None, reason="gvpr not available") def test_gvpr_usage(): """