On 11/24/21 14:33, Philippe Mathieu-Daudé wrote: > On 11/24/21 14:01, Daniel P. Berrangé wrote: >> With latest clang 13.0.0 we get >> >> ../ui/clipboard.c:47:34: error: variable 'old' set but not used >> [-Werror,-Wunused-but-set-variable] >> g_autoptr(QemuClipboardInfo) old = NULL; >> ^ >> >> The compiler can't tell that we only declared this variable in >> order to get the side effect of free'ing it when out of scope. >> >> This pattern is a little dubious for a use of g_autoptr, so >> rewrite the code to avoid it. >> >> Signed-off-by: Daniel P. Berrangé <berra...@redhat.com> >> --- >> ui/clipboard.c | 3 +-- >> 1 file changed, 1 insertion(+), 2 deletions(-) > > Reviewed-by: Philippe Mathieu-Daudé <phi...@redhat.com> > Tested-by: Philippe Mathieu-Daudé <phi...@redhat.com> >
Could we get this patch directly applied as a buildfix?