summaryrefslogtreecommitdiff
path: root/Build/source/libs/poppler/poppler-0.18.4-PATCHES/patch-02-warnings
blob: 26c4739b40d15c92bcb45480690ecce761b5fb71 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
diff -ur poppler-0.18.4.orig/poppler/Annot.cc poppler-0.18.4/poppler/Annot.cc
--- poppler-0.18.4.orig/poppler/Annot.cc	2011-11-22 22:33:10.000000000 +0100
+++ poppler-0.18.4/poppler/Annot.cc	2012-02-23 11:07:25.726255602 +0100
@@ -2643,7 +2643,7 @@
 	y3 = quadrilaterals->getY3(i);
 	x4 = quadrilaterals->getX4(i);
 	y4 = quadrilaterals->getY4(i);
-	h4 = abs(y1 - y3) / 4.0;
+	h4 = fabs(y1 - y3) / 4.0;
 
 	appearBuf->appendf ("{0:.2f} {1:.2f} m\n", x3, y3);
 	appearBuf->appendf ("{0:.2f} {1:.2f} {2:.2f} {3:.2f} {4:.2f} {5:.2f} c\n",
diff -ur poppler-0.18.4.orig/poppler/GfxState.cc poppler-0.18.4/poppler/GfxState.cc
--- poppler-0.18.4.orig/poppler/GfxState.cc	2012-01-30 20:32:08.000000000 +0100
+++ poppler-0.18.4/poppler/GfxState.cc	2012-02-23 11:07:25.730261537 +0100
@@ -3009,7 +3009,7 @@
 
   getParameterRange(&sMin, &sMax, xMin, yMin, xMax, yMax);
   upperBound = ctm->norm() * getDistance(sMin, sMax);
-  maxSize = ceil(upperBound);
+  maxSize = (int)ceil(upperBound);
   maxSize = std::max<int>(maxSize, 2);
 
   {
diff -ur poppler-0.18.4.orig/poppler/GfxState.h poppler-0.18.4/poppler/GfxState.h
--- poppler-0.18.4.orig/poppler/GfxState.h	2011-11-22 22:33:12.000000000 +0100
+++ poppler-0.18.4/poppler/GfxState.h	2012-02-23 11:07:25.730261537 +0100
@@ -100,7 +100,7 @@
 }
 
 static inline Guchar dblToByte(double x) {
-  return (x * 255.0);
+  return (Guchar)(x * 255.0);
 }
 
 static inline double byteToDbl(Guchar x) {
diff -ur poppler-0.18.4.orig/poppler/Hints.cc poppler-0.18.4/poppler/Hints.cc
--- poppler-0.18.4.orig/poppler/Hints.cc	2011-11-22 22:33:13.000000000 +0100
+++ poppler-0.18.4/poppler/Hints.cc	2012-02-23 11:07:25.730261537 +0100
@@ -413,7 +413,7 @@
 {
   Guint bit, bits;
 
-  if (n < 0) return -1;
+  if (n < 0) return (Guint)-1;
   if (n == 0) return 0;
 
   if (n == 1)
@@ -421,11 +421,11 @@
 
   bit = (readBit(str) << (n-1));
   if (bit == (Guint) -1)
-    return -1;
+    return (Guint)-1;
 
   bits = readBits(n-1, str);
   if (bits == (Guint) -1)
-    return -1;
+    return (Guint)-1;
 
   return bit | bits;
 }
diff -ur poppler-0.18.4.orig/poppler/Lexer.cc poppler-0.18.4/poppler/Lexer.cc
--- poppler-0.18.4.orig/poppler/Lexer.cc	2012-02-15 18:10:57.000000000 +0100
+++ poppler-0.18.4/poppler/Lexer.cc	2012-02-23 11:07:25.730261537 +0100
@@ -216,7 +216,7 @@
 	      overflownUnsignedInteger = gTrue;
 	      xf = xi * 10.0 + (c - '0');
 	    } else {
-	      xui = xi * 10.0 + (c - '0');
+	      xui = (unsigned int)(xi * 10.0 + (c - '0'));
 	    }
 	  } else {
 	    xi = xi * 10 + (c - '0');
diff -ur poppler-0.18.4.orig/poppler/Stream.cc poppler-0.18.4/poppler/Stream.cc
--- poppler-0.18.4.orig/poppler/Stream.cc	2011-11-22 22:33:16.000000000 +0100
+++ poppler-0.18.4/poppler/Stream.cc	2012-02-23 11:07:25.730261537 +0100
@@ -474,7 +474,7 @@
   } else if (nBits == 8) {
     Guchar *line = imgLine;
     int readChars = str->doGetChars(nVals, line);
-    for ( ; readChars < nVals; readChars++) line[readChars] = EOF;
+    for ( ; readChars < nVals; readChars++) line[readChars] = (Guchar)EOF;
   } else if (nBits == 16) {
     // this is a hack to support 16 bits images, everywhere
     // we assume a component fits in 8 bits, with this hack