aboutsummaryrefslogtreecommitdiffstats
path: root/community/simple-scan/14fe1c4d345d692ab4f73be59ca4a0b96893d0b1.patch
blob: b79002f63ae7594f23286a6784379380b24108cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
From 14fe1c4d345d692ab4f73be59ca4a0b96893d0b1 Mon Sep 17 00:00:00 2001
From: Rico Tzschichholz <ricotz@ubuntu.com>
Date: Sat, 14 Sep 2019 20:03:47 +0200
Subject: [PATCH] libwepmix: Fix use of possibly unassigned local variable
 'data'

---
 src/libwebpmux.vapi | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/libwebpmux.vapi b/src/libwebpmux.vapi
index f2461a2..42d2886 100644
--- a/src/libwebpmux.vapi
+++ b/src/libwebpmux.vapi
@@ -61,9 +61,7 @@ namespace WebP
         [CCode (cname = "vala_set_image")]
         public MuxError set_image (uint8[] bitstream, bool copy_data)
         {
-                Data data;
-                data.bytes = bitstream;
-                data.size = bitstream.length;
+                Data data = { bitstream, bitstream.length };
                 return _set_image (data, copy_data);
         }
 
@@ -89,9 +87,7 @@ namespace WebP
         public MuxError set_chunk (string fourcc, uint8[] chunk_data, bool copy_data)
         requires (fourcc.length == 4)
         {
-            Data data;
-            data.bytes = chunk_data;
-            data.size = chunk_data.length;
+            Data data = { chunk_data ,chunk_data.length };
             return _set_chunk ((uchar[]) fourcc, data, copy_data);
         }
 
-- 
2.22.0