[libvirt PATCH 30/31] tools: virsh-secret: fix compilation error

Pavel Hrdina phrdina at redhat.com
Thu Jul 2 12:25:28 UTC 2020


../tools/virsh-secret.c: In function ‘cmdSecretSetValue’:
../tools/virsh-secret.c:262:15: error: pointer targets in assignment from ‘char *’ to ‘unsigned char *’ differ in signedness [-Werror=pointer-sign]
  262 |         value = g_steal_pointer(&file_buf);
      |               ^
cc1: all warnings being treated as errors

Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
---
 tools/virsh-secret.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/virsh-secret.c b/tools/virsh-secret.c
index be4adc416ec..92801361477 100644
--- a/tools/virsh-secret.c
+++ b/tools/virsh-secret.c
@@ -259,7 +259,7 @@ cmdSecretSetValue(vshControl *ctl, const vshCmd *cmd)
     }
 
     if (plain) {
-        value = g_steal_pointer(&file_buf);
+        value = (unsigned char *) g_steal_pointer(&file_buf);
         value_size = file_len;
         file_len = 0;
     } else {
-- 
2.26.2




More information about the libvir-list mailing list