Merge lp:~serge-hallyn/ubuntu/raring/spice/spice-compiler-warnings into lp:ubuntu/raring/spice

Proposed by Serge Hallyn
Status: Merged
Merged at revision: 11
Proposed branch: lp:~serge-hallyn/ubuntu/raring/spice/spice-compiler-warnings
Merge into: lp:ubuntu/raring/spice
Diff against target: 657 lines (+575/-31) (has conflicts)
7 files modified
.pc/applied-patches.OTHER (+3/-0)
.pc/fix-missing-PIXEL-pointer-cast/spice-common/common/lz_compress_tmpl.c (+547/-0)
debian/changelog (+3/-3)
debian/patches/fix-compiler-warnings.patch (+0/-27)
debian/patches/fix-missing-PIXEL-pointer-cast (+17/-0)
debian/patches/series (+1/-1)
spice-common/common/lz_compress_tmpl.c (+4/-0)
Contents conflict in .pc/applied-patches
Text conflict in spice-common/common/lz_compress_tmpl.c
To merge this branch: bzr merge lp:~serge-hallyn/ubuntu/raring/spice/spice-compiler-warnings
Reviewer Review Type Date Requested Status
Dustin Kirkland  Pending
Review via email: mp+146239@code.launchpad.net

Description of the change

Update to remove the handling of seteuid(0) failure.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file '.pc/applied-patches.OTHER'
--- .pc/applied-patches.OTHER 1970-01-01 00:00:00 +0000
+++ .pc/applied-patches.OTHER 2013-02-01 22:40:24 +0000
@@ -0,0 +1,3 @@
1link-libspice-server-with-libm-libpthread.patch
2make-celt-to-be-optional.patch
3fix-missing-PIXEL-pointer-cast
04
=== added directory '.pc/fix-missing-PIXEL-pointer-cast'
=== added file '.pc/fix-missing-PIXEL-pointer-cast/.timestamp'
=== added directory '.pc/fix-missing-PIXEL-pointer-cast/spice-common'
=== added directory '.pc/fix-missing-PIXEL-pointer-cast/spice-common/common'
=== added file '.pc/fix-missing-PIXEL-pointer-cast/spice-common/common/lz_compress_tmpl.c'
--- .pc/fix-missing-PIXEL-pointer-cast/spice-common/common/lz_compress_tmpl.c 1970-01-01 00:00:00 +0000
+++ .pc/fix-missing-PIXEL-pointer-cast/spice-common/common/lz_compress_tmpl.c 2013-02-01 22:40:24 +0000
@@ -0,0 +1,547 @@
1/* -*- Mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2/*
3
4 Copyright (C) 2009 Red Hat, Inc. and/or its affiliates.
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 This file incorporates work covered by the following copyright and
17 permission notice:
18 Copyright (C) 2007 Ariya Hidayat (ariya@kde.org)
19 Copyright (C) 2006 Ariya Hidayat (ariya@kde.org)
20 Copyright (C) 2005 Ariya Hidayat (ariya@kde.org)
21
22 Permission is hereby granted, free of charge, to any person
23 obtaining a copy of this software and associated documentation
24 files (the "Software"), to deal in the Software without
25 restriction, including without limitation the rights to use, copy,
26 modify, merge, publish, distribute, sublicense, and/or sell copies
27 of the Software, and to permit persons to whom the Software is
28 furnished to do so, subject to the following conditions:
29
30 The above copyright notice and this permission notice shall be
31 included in all copies or substantial portions of the Software.
32
33 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
35 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
37 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
38 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
39 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
40 SOFTWARE.
41
42*/
43#ifdef HAVE_CONFIG_H
44#include <config.h>
45#endif
46
47#define DJB2_START 5381;
48#define DJB2_HASH(hash, c) (hash = ((hash << 5) + hash) ^ (c)) //|{hash = ((hash << 5) + hash) + c;}
49
50/*
51 For each pixel type the following macros are defined:
52 PIXEL : input type
53 FNAME(name)
54 ENCODE_PIXEL(encoder, pixel) : writing a pixel to the compressed buffer (byte by byte)
55 SAME_PIXEL(pix1, pix2) : comparing two pixels
56 HASH_FUNC(value, pix_ptr) : hash func of 3 consecutive pixels
57*/
58
59#ifdef LZ_PLT
60#define PIXEL one_byte_pixel_t
61#define FNAME(name) lz_plt_##name
62#define ENCODE_PIXEL(e, pix) encode(e, (pix).a) // gets the pixel and write only the needed bytes
63 // from the pixel
64#define SAME_PIXEL(pix1, pix2) ((pix1).a == (pix2).a)
65#define HASH_FUNC(v, p) { \
66 v = DJB2_START; \
67 DJB2_HASH(v, p[0].a); \
68 DJB2_HASH(v, p[1].a); \
69 DJB2_HASH(v, p[2].a); \
70 v &= HASH_MASK; \
71 }
72#endif
73
74#ifdef LZ_A8
75#define PIXEL one_byte_pixel_t
76#define FNAME(name) lz_a8_##name
77#define ENCODE_PIXEL(e, pix) encode(e, (pix).a) // gets the pixel and write only the needed bytes
78 // from the pixel
79#define SAME_PIXEL(pix1, pix2) ((pix1).a == (pix2).a)
80#define HASH_FUNC(v, p) { \
81 v = DJB2_START; \
82 DJB2_HASH(v, p[0].a); \
83 DJB2_HASH(v, p[1].a); \
84 DJB2_HASH(v, p[2].a); \
85 v &= HASH_MASK; \
86 }
87#endif
88
89#ifdef LZ_RGB_ALPHA
90//#undef LZ_RGB_ALPHA
91#define PIXEL rgb32_pixel_t
92#define FNAME(name) lz_rgb_alpha_##name
93#define ENCODE_PIXEL(e, pix) {encode(e, (pix).pad);}
94#define SAME_PIXEL(pix1, pix2) ((pix1).pad == (pix2).pad)
95#define HASH_FUNC(v, p) { \
96 v = DJB2_START; \
97 DJB2_HASH(v, p[0].pad); \
98 DJB2_HASH(v, p[1].pad); \
99 DJB2_HASH(v, p[2].pad); \
100 v &= HASH_MASK; \
101 }
102#endif
103
104
105#ifdef LZ_RGB16
106#define PIXEL rgb16_pixel_t
107#define FNAME(name) lz_rgb16_##name
108#define GET_r(pix) (((pix) >> 10) & 0x1f)
109#define GET_g(pix) (((pix) >> 5) & 0x1f)
110#define GET_b(pix) ((pix) & 0x1f)
111#define ENCODE_PIXEL(e, pix) {encode(e, (pix) >> 8); encode(e, (pix) & 0xff);}
112
113#define HASH_FUNC(v, p) { \
114 v = DJB2_START; \
115 DJB2_HASH(v, p[0] & (0x00ff)); \
116 DJB2_HASH(v, (p[0] >> 8) & (0x007f)); \
117 DJB2_HASH(v, p[1]&(0x00ff)); \
118 DJB2_HASH(v, (p[1] >> 8) & (0x007f)); \
119 DJB2_HASH(v, p[2] & (0x00ff)); \
120 DJB2_HASH(v, (p[2] >> 8) & (0x007f)); \
121 v &= HASH_MASK; \
122}
123#endif
124
125#ifdef LZ_RGB24
126#define PIXEL rgb24_pixel_t
127#define FNAME(name) lz_rgb24_##name
128#define ENCODE_PIXEL(e, pix) {encode(e, (pix).b); encode(e, (pix).g); encode(e, (pix).r);}
129#endif
130
131#ifdef LZ_RGB32
132#define PIXEL rgb32_pixel_t
133#define FNAME(name) lz_rgb32_##name
134#define ENCODE_PIXEL(e, pix) {encode(e, (pix).b); encode(e, (pix).g); encode(e, (pix).r);}
135#endif
136
137
138#if defined(LZ_RGB24) || defined(LZ_RGB32)
139#define GET_r(pix) ((pix).r)
140#define GET_g(pix) ((pix).g)
141#define GET_b(pix) ((pix).b)
142#define HASH_FUNC(v, p) { \
143 v = DJB2_START; \
144 DJB2_HASH(v, p[0].r); \
145 DJB2_HASH(v, p[0].g); \
146 DJB2_HASH(v, p[0].b); \
147 DJB2_HASH(v, p[1].r); \
148 DJB2_HASH(v, p[1].g); \
149 DJB2_HASH(v, p[1].b); \
150 DJB2_HASH(v, p[2].r); \
151 DJB2_HASH(v, p[2].g); \
152 DJB2_HASH(v, p[2].b); \
153 v &= HASH_MASK; \
154 }
155#endif
156
157#if defined(LZ_RGB16) || defined(LZ_RGB24) || defined(LZ_RGB32)
158#define SAME_PIXEL(p1, p2) (GET_r(p1) == GET_r(p2) && GET_g(p1) == GET_g(p2) && \
159 GET_b(p1) == GET_b(p2))
160
161#endif
162
163#define PIXEL_ID(pix_ptr, seg_ptr) (pix_ptr - ((PIXEL *)seg_ptr->lines) + seg_ptr->size_delta)
164
165// when encoding, the ref can be in previous segment, and we should check that it doesn't
166// exceeds its bounds.
167// TODO: optimization: when only one chunk exists or when the reference is in the same segment,
168// don't make checks if we reach end of segments
169// TODO: optimize to continue match between segments?
170// TODO: check hash function
171// TODO: check times
172
173/* compresses one segment starting from 'from'.*/
174static void FNAME(compress_seg)(Encoder *encoder, LzImageSegment *seg, PIXEL *from, int copied)
175{
176 const PIXEL *ip = from;
177 const PIXEL *ip_bound = (PIXEL *)(seg->lines_end) - BOUND_OFFSET;
178 const PIXEL *ip_limit = (PIXEL *)(seg->lines_end) - LIMIT_OFFSET;
179 HashEntry *hslot;
180 int hval;
181 int copy = copied;
182
183 if (copy == 0) {
184 encode_copy_count(encoder, MAX_COPY - 1);
185 }
186
187
188 while (LZ_EXPECT_CONDITIONAL(ip < ip_limit)) { // TODO: maybe change ip_limit and enabling
189 // moving to the next seg
190 const PIXEL *ref;
191 const PIXEL *ref_limit;
192 size_t distance;
193
194 /* minimum match length */
195#if defined(LZ_PLT) || defined(LZ_RGB_ALPHA) || defined(LZ_A8)
196 size_t len = 3;
197#elif defined(LZ_RGB16)
198 size_t len = 2;
199#else
200 size_t len = 1;
201#endif
202 /* comparison starting-point */
203 const PIXEL *anchor = ip;
204
205
206
207 // TODO: RLE without checking if not first byte.
208 // TODO: optimize comparisons
209
210 /* check for a run */ // TODO for RGB we can use less pixels
211 if (LZ_EXPECT_CONDITIONAL(ip > (PIXEL *)(seg->lines))) {
212 if (SAME_PIXEL(ip[-1], ip[0]) && SAME_PIXEL(ip[0], ip[1]) && SAME_PIXEL(ip[1], ip[2])) {
213 distance = 1;
214 ip += 3;
215 ref = anchor + 2;
216 ref_limit = (PIXEL *)(seg->lines_end);
217#if defined(LZ_RGB16) || defined(LZ_RGB24) || defined(LZ_RGB32)
218 len = 3;
219#endif
220 goto match;
221 }
222 }
223
224 /* find potential match */
225 HASH_FUNC(hval, ip);
226 hslot = encoder->htab + hval;
227 ref = (PIXEL *)(hslot->ref);
228 ref_limit = (PIXEL *)(hslot->image_seg->lines_end);
229
230 /* calculate distance to the match */
231 distance = PIXEL_ID(anchor, seg) - PIXEL_ID(ref, hslot->image_seg);
232
233 /* update hash table */
234 hslot->image_seg = seg;
235 hslot->ref = (uint8_t *)anchor;
236
237 /* is this a match? check the first 3 pixels */
238 if (distance == 0 || (distance >= MAX_FARDISTANCE)) {
239 goto literal;
240 }
241 /* check if the hval key identical*/
242 // no need to check ref limit here because the word size in the htab is 3 pixels
243 if (!SAME_PIXEL(*ref, *ip)) {
244 ref++;
245 ip++;
246 goto literal;
247 }
248 ref++;
249 ip++;
250
251 /* minimum match length for rgb16 is 2 and for plt and alpha is 3 */
252#if defined(LZ_PLT) || defined(LZ_RGB_ALPHA) || defined(LZ_RGB16) || defined(LZ_A8)
253 if (!SAME_PIXEL(*ref, *ip)) {
254 ref++;
255 ip++;
256 goto literal;
257 }
258 ref++;
259 ip++;
260#endif
261
262#if defined(LZ_PLT) || defined(LZ_RGB_ALPHA) || defined(LZ_A8)
263 if (!SAME_PIXEL(*ref, *ip)) {
264 ref++;
265 ip++;
266 goto literal;
267 }
268 ref++;
269 ip++;
270#endif
271 /* far, needs at least 5-byte match */
272 if (distance >= MAX_DISTANCE) {
273#if defined(LZ_PLT) || defined(LZ_RGB_ALPHA) || defined(LZ_A8)
274 if (ref >= (ref_limit - 1)) {
275 goto literal;
276 }
277#else
278 if (ref > (ref_limit - 1)) {
279 goto literal;
280 }
281#endif
282 if (!SAME_PIXEL(*ref, *ip)) {
283 ref++;
284 ip++;
285 goto literal;
286 }
287 ref++;
288 ip++;
289 len++;
290#if defined(LZ_PLT) || defined(LZ_RGB_ALPHA) || defined(LZ_A8)
291 if (!SAME_PIXEL(*ref, *ip)) {
292 ref++;
293 ip++;
294 goto literal;
295 }
296 ref++;
297 ip++;
298 len++;
299#endif
300 }
301match: // RLE or dictionary (both are encoded by distance from ref (-1) and length)
302
303 /* distance is biased */
304 distance--;
305
306 // ip is located now at the position of the second mismatch.
307 // later it will be subtracted by 3
308
309 if (!distance) {
310 /* zero distance means a run */
311 PIXEL x = *ref;
312 while ((ip < ip_bound) && (ref < ref_limit)) { // TODO: maybe separate a run from
313 // the same seg or from different
314 // ones in order to spare
315 // ref < ref_limit
316 if (!SAME_PIXEL(*ref, x)) {
317 ref++;
318 break;
319 } else {
320 ref++;
321 ip++;
322 }
323 }
324 } else {
325 // TODO: maybe separate a run from the same seg or from different ones in order
326 // to spare ref < ref_limit and that way we can also perform 8 calls of
327 // (ref++ != ip++) outside a loop
328 for (;;) {
329 while ((ip < ip_bound) && (ref < ref_limit)) {
330 if (!SAME_PIXEL(*ref, *ip)) {
331 ref++;
332 ip++;
333 break;
334 } else {
335 ref++;
336 ip++;
337 }
338 }
339 break;
340 }
341 }
342
343 /* if we have copied something, adjust the copy count */
344 if (copy) {
345 /* copy is biased, '0' means 1 byte copy */
346 update_copy_count(encoder, copy - 1);
347 } else {
348 /* back, to overwrite the copy count */
349 compress_output_prev(encoder);
350 }
351
352 /* reset literal counter */
353 copy = 0;
354
355 /* length is biased, '1' means a match of 3 pixels for PLT and alpha*/
356 /* for RGB 16 1 means 2 */
357 /* for RGB24/32 1 means 1...*/
358 ip -= 3;
359 len = ip - anchor;
360#if defined(LZ_RGB16)
361 len++;
362#elif defined(LZ_RGB24) || defined(LZ_RGB32)
363 len += 2;
364#endif
365 /* encode the match (like fastlz level 2)*/
366 if (distance < MAX_DISTANCE) { // MAX_DISTANCE is 2^13 - 1
367 // when copy is performed, the byte that holds the copy count is smaller than 32.
368 // When there is a reference, the first byte is always larger then 32
369
370 // 3 bits = length, 5 bits = 5 MSB of distance, 8 bits = 8 LSB of distance
371 if (len < 7) {
372 encode(encoder, (uint8_t)((len << 5) + (distance >> 8)));
373 encode(encoder, (uint8_t)(distance & 255));
374 } else { // more than 3 bits are needed for length
375 // 3 bits 7, 5 bits = 5 MSB of distance, next bytes are 255 till we
376 // receive a smaller number, last byte = 8 LSB of distance
377 encode(encoder, (uint8_t)((7 << 5) + (distance >> 8)));
378 for (len -= 7; len >= 255; len -= 255) {
379 encode(encoder, 255);
380 }
381 encode(encoder, (uint8_t)len);
382 encode(encoder, (uint8_t)(distance & 255));
383 }
384 } else {
385 /* far away */
386 if (len < 7) { // the max_far_distance is ~2^16+2^13 so two more bytes are needed
387 // 3 bits = length, 5 bits = 5 MSB of MAX_DISTANCE, 8 bits = 8 LSB of MAX_DISTANCE,
388 // 8 bits = 8 MSB distance-MAX_distance (smaller than 2^16),8 bits=8 LSB of
389 // distance-MAX_distance
390 distance -= MAX_DISTANCE;
391 encode(encoder, (uint8_t)((len << 5) + 31));
392 encode(encoder, (uint8_t)255);
393 encode(encoder, (uint8_t)(distance >> 8));
394 encode(encoder, (uint8_t)(distance & 255));
395 } else {
396 // same as before, but the first byte is followed by the left overs of len
397 distance -= MAX_DISTANCE;
398 encode(encoder, (uint8_t)((7 << 5) + 31));
399 for (len -= 7; len >= 255; len -= 255) {
400 encode(encoder, 255);
401 }
402 encode(encoder, (uint8_t)len);
403 encode(encoder, 255);
404 encode(encoder, (uint8_t)(distance >> 8));
405 encode(encoder, (uint8_t)(distance & 255));
406 }
407 }
408
409 /* update the hash at match boundary */
410#if defined(LZ_RGB16) || defined(LZ_RGB24) || defined(LZ_RGB32)
411 if (ip > anchor) {
412#endif
413 HASH_FUNC(hval, ip);
414 encoder->htab[hval].ref = (uint8_t *)ip;
415 ip++;
416 encoder->htab[hval].image_seg = seg;
417#if defined(LZ_RGB16) || defined(LZ_RGB24) || defined(LZ_RGB32)
418 } else {ip++;
419 }
420#endif
421#if defined(LZ_RGB24) || defined(LZ_RGB32)
422 if (ip > anchor) {
423#endif
424 HASH_FUNC(hval, ip);
425 encoder->htab[hval].ref = (uint8_t *)ip;
426 ip++;
427 encoder->htab[hval].image_seg = seg;
428#if defined(LZ_RGB24) || defined(LZ_RGB32)
429 } else {ip++;
430 }
431#endif
432 /* assuming literal copy */
433 encode_copy_count(encoder, MAX_COPY - 1);
434 continue;
435
436literal:
437 ENCODE_PIXEL(encoder, *anchor);
438 anchor++;
439 ip = anchor;
440 copy++;
441
442 if (LZ_UNEXPECT_CONDITIONAL(copy == MAX_COPY)) {
443 copy = 0;
444 encode_copy_count(encoder, MAX_COPY - 1);
445 }
446 } // END LOOP (ip < ip_limit)
447
448
449 /* left-over as literal copy */
450 ip_bound++;
451 while (ip <= ip_bound) {
452 ENCODE_PIXEL(encoder, *ip);
453 ip++;
454 copy++;
455 if (copy == MAX_COPY) {
456 copy = 0;
457 encode_copy_count(encoder, MAX_COPY - 1);
458 }
459 }
460
461 /* if we have copied something, adjust the copy length */
462 if (copy) {
463 update_copy_count(encoder, copy - 1);
464 } else {
465 compress_output_prev(encoder); // in case we created a new buffer for copy, check that
466 // red_worker could handle size that do not contain the
467 // ne buffer
468 }
469}
470
471
472/* initializes the hash table. if the file is very small, copies it.
473 copies the first two pixels of the first segment, and sends the segments
474 one by one to compress_seg.
475 the number of bytes compressed are stored inside encoder.
476 */
477static void FNAME(compress)(Encoder *encoder)
478{
479 LzImageSegment *cur_seg = encoder->head_image_segs;
480 HashEntry *hslot;
481 PIXEL *ip;
482 PIXEL *ip_start;
483
484 // fetch the first image segment that is not too small
485 while (cur_seg && ((((PIXEL *)cur_seg->lines_end) - ((PIXEL *)cur_seg->lines)) < 4)) {
486 ip_start = cur_seg->lines;
487 // coping the segment
488 if (cur_seg->lines != cur_seg->lines_end) {
489 ip = (PIXEL *)cur_seg->lines;
490 // Note: we assume MAX_COPY > 3
491 encode_copy_count(encoder, (uint8_t)(
492 (((PIXEL *)cur_seg->lines_end) - ((PIXEL *)cur_seg->lines)) - 1));
493 while (ip < (PIXEL *)cur_seg->lines_end) {
494 ENCODE_PIXEL(encoder, *ip);
495 ip++;
496 }
497 }
498 cur_seg = cur_seg->next;
499 }
500
501 if (!cur_seg) {
502 return;
503 }
504
505 ip = (PIXEL *)cur_seg->lines;
506
507 /* initialize hash table */
508 for (hslot = encoder->htab; hslot < encoder->htab + HASH_SIZE; hslot++) {
509 hslot->ref = (uint8_t*)ip;
510 hslot->image_seg = cur_seg;
511 }
512
513 encode_copy_count(encoder, MAX_COPY - 1);
514 ENCODE_PIXEL(encoder, *ip);
515 ip++;
516 ENCODE_PIXEL(encoder, *ip);
517 ip++;
518
519 // compressing the first segment
520 FNAME(compress_seg)(encoder, cur_seg, ip, 2);
521
522 // compressing the next segments
523 for (cur_seg = cur_seg->next; cur_seg; cur_seg = cur_seg->next) {
524 FNAME(compress_seg)(encoder, cur_seg, (PIXEL *)cur_seg->lines, 0);
525 }
526}
527
528#undef FNAME
529#undef PIXEL_ID
530#undef PIXEL
531#undef ENCODE_PIXEL
532#undef SAME_PIXEL
533#undef LZ_READU16
534#undef HASH_FUNC
535#undef BYTES_TO_16
536#undef HASH_FUNC_16
537#undef GET_r
538#undef GET_g
539#undef GET_b
540#undef GET_CODE
541#undef LZ_PLT
542#undef LZ_RGB_ALPHA
543#undef LZ_RGB16
544#undef LZ_RGB24
545#undef LZ_RGB32
546#undef LZ_A8
547#undef HASH_FUNC2
0548
=== modified file 'debian/changelog'
--- debian/changelog 2013-02-01 20:25:36 +0000
+++ debian/changelog 2013-02-01 22:40:24 +0000
@@ -1,7 +1,7 @@
1spice (0.12.0-0ubuntu2) UNRELEASED; urgency=low1spice (0.12.0-0ubuntu2) raring; urgency=low
22
3 * debian/patches/fix-compiler-warnings.patch: fix compiler warnings in3 * debian/patches/fix-missing-PIXEL-pointer-cast: address compiler warning in
4 the common and server code.4 the spice-common code.
55
6 -- Serge Hallyn <serge.hallyn@ubuntu.com> Fri, 01 Feb 2013 14:24:43 -06006 -- Serge Hallyn <serge.hallyn@ubuntu.com> Fri, 01 Feb 2013 14:24:43 -0600
77
88
=== removed file 'debian/patches/fix-compiler-warnings.patch'
--- debian/patches/fix-compiler-warnings.patch 2013-02-01 20:25:36 +0000
+++ debian/patches/fix-compiler-warnings.patch 1970-01-01 00:00:00 +0000
@@ -1,27 +0,0 @@
1Index: spice-0.12.0/spice-common/common/backtrace.c
2===================================================================
3--- spice-0.12.0.orig/spice-common/common/backtrace.c 2012-08-22 16:33:04.000000000 +0000
4+++ spice-0.12.0/spice-common/common/backtrace.c 2013-02-01 19:28:10.127899552 +0000
5@@ -78,7 +78,8 @@
6 /* CHILD */
7 char parent[16];
8
9- seteuid(0);
10+ if (seteuid(0)) /* ERROR */
11+ return -1;
12 close(STDIN_FILENO);
13 close(STDOUT_FILENO);
14 dup2(pipefd[1],STDOUT_FILENO);
15Index: spice-0.12.0/spice-common/common/lz_compress_tmpl.c
16===================================================================
17--- spice-0.12.0.orig/spice-common/common/lz_compress_tmpl.c 2012-09-02 17:52:16.000000000 +0000
18+++ spice-0.12.0/spice-common/common/lz_compress_tmpl.c 2013-02-01 19:57:28.051899552 +0000
19@@ -483,7 +483,7 @@
20
21 // fetch the first image segment that is not too small
22 while (cur_seg && ((((PIXEL *)cur_seg->lines_end) - ((PIXEL *)cur_seg->lines)) < 4)) {
23- ip_start = cur_seg->lines;
24+ ip_start = (PIXEL *) cur_seg->lines;
25 // coping the segment
26 if (cur_seg->lines != cur_seg->lines_end) {
27 ip = (PIXEL *)cur_seg->lines;
280
=== added file 'debian/patches/fix-missing-PIXEL-pointer-cast'
--- debian/patches/fix-missing-PIXEL-pointer-cast 1970-01-01 00:00:00 +0000
+++ debian/patches/fix-missing-PIXEL-pointer-cast 2013-02-01 22:40:24 +0000
@@ -0,0 +1,17 @@
1Description: Address a compilation warning due to missing typecast
2Author: Serge Hallyn <serge.hallyn@ubuntu.com>
3Forwarded: yes
4
5Index: spice/spice-common/common/lz_compress_tmpl.c
6===================================================================
7--- spice.orig/spice-common/common/lz_compress_tmpl.c 2013-02-01 16:27:43.000000000 -0600
8+++ spice/spice-common/common/lz_compress_tmpl.c 2013-02-01 16:34:55.205042276 -0600
9@@ -483,7 +483,7 @@
10
11 // fetch the first image segment that is not too small
12 while (cur_seg && ((((PIXEL *)cur_seg->lines_end) - ((PIXEL *)cur_seg->lines)) < 4)) {
13- ip_start = cur_seg->lines;
14+ ip_start = (PIXEL *)cur_seg->lines;
15 // coping the segment
16 if (cur_seg->lines != cur_seg->lines_end) {
17 ip = (PIXEL *)cur_seg->lines;
018
=== modified file 'debian/patches/series'
--- debian/patches/series 2013-02-01 20:25:36 +0000
+++ debian/patches/series 2013-02-01 22:40:24 +0000
@@ -1,3 +1,3 @@
1link-libspice-server-with-libm-libpthread.patch1link-libspice-server-with-libm-libpthread.patch
2make-celt-to-be-optional.patch2make-celt-to-be-optional.patch
3fix-compiler-warnings.patch3fix-missing-PIXEL-pointer-cast
44
=== modified file 'spice-common/common/lz_compress_tmpl.c'
--- spice-common/common/lz_compress_tmpl.c 2013-02-01 20:42:32 +0000
+++ spice-common/common/lz_compress_tmpl.c 2013-02-01 22:40:24 +0000
@@ -483,7 +483,11 @@
483483
484 // fetch the first image segment that is not too small484 // fetch the first image segment that is not too small
485 while (cur_seg && ((((PIXEL *)cur_seg->lines_end) - ((PIXEL *)cur_seg->lines)) < 4)) {485 while (cur_seg && ((((PIXEL *)cur_seg->lines_end) - ((PIXEL *)cur_seg->lines)) < 4)) {
486<<<<<<< TREE
486 ip_start = cur_seg->lines;487 ip_start = cur_seg->lines;
488=======
489 ip_start = (PIXEL *)cur_seg->lines;
490>>>>>>> MERGE-SOURCE
487 // coping the segment491 // coping the segment
488 if (cur_seg->lines != cur_seg->lines_end) {492 if (cur_seg->lines != cur_seg->lines_end) {
489 ip = (PIXEL *)cur_seg->lines;493 ip = (PIXEL *)cur_seg->lines;

Subscribers

People subscribed via source and target branches

to all changes: