Re: [PATCH v2 2/2] ui/clipboard: Don't use g_autoptr just to free a variable

2021-12-08 Thread John Snow
On Wed, Dec 8, 2021, 4:11 AM Daniel P. Berrangé wrote: > On Tue, Dec 07, 2021 at 03:40:38PM -0500, John Snow wrote: > > Clang doesn't recognize that the variable is being "used" and will emit > > a warning: > > > > ../ui/clipboard.c:47:34: error: variable 'old' set but not used > [-Werror,-Wunu

Re: [PATCH v2 2/2] ui/clipboard: Don't use g_autoptr just to free a variable

2021-12-08 Thread Philippe Mathieu-Daudé
On 12/8/21 10:11, Daniel P. Berrangé wrote: > On Tue, Dec 07, 2021 at 03:40:38PM -0500, John Snow wrote: >> Clang doesn't recognize that the variable is being "used" and will emit >> a warning: >> >> ../ui/clipboard.c:47:34: error: variable 'old' set but not used >> [-Werror,-Wunused-but-set-var

Re: [PATCH v2 2/2] ui/clipboard: Don't use g_autoptr just to free a variable

2021-12-08 Thread Daniel P . Berrangé
On Tue, Dec 07, 2021 at 03:40:38PM -0500, John Snow wrote: > Clang doesn't recognize that the variable is being "used" and will emit > a warning: > > ../ui/clipboard.c:47:34: error: variable 'old' set but not used > [-Werror,-Wunused-but-set-variable] > g_autoptr(QemuClipboardInfo) old =

Re: [PATCH v2 2/2] ui/clipboard: Don't use g_autoptr just to free a variable

2021-12-08 Thread Philippe Mathieu-Daudé
On 12/7/21 21:40, John Snow wrote: > Clang doesn't recognize that the variable is being "used" and will emit > a warning: > > ../ui/clipboard.c:47:34: error: variable 'old' set but not used > [-Werror,-Wunused-but-set-variable] > g_autoptr(QemuClipboardInfo) old = NULL; >

[PATCH v2 2/2] ui/clipboard: Don't use g_autoptr just to free a variable

2021-12-07 Thread John Snow
Clang doesn't recognize that the variable is being "used" and will emit a warning: ../ui/clipboard.c:47:34: error: variable 'old' set but not used [-Werror,-Wunused-but-set-variable] g_autoptr(QemuClipboardInfo) old = NULL; ^ 1 error generated. OK, fine