~serge-hallyn/ubuntu/raring/spice/spice-compiler-warnings

« back to all changes in this revision

Viewing changes to debian/patches/fix-compiler-warnings.patch

  • Committer: Serge Hallyn
  • Date: 2013-02-01 22:37:52 UTC
  • Revision ID: serge.hallyn@canonical.com-20130201223752-8wmmpn75r1wjo8di
debian/patches/fix-missing-PIXEL-pointer-cast: address compiler warning in
the spice-common code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Index: 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);
15
 
Index: 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;