summaryrefslogtreecommitdiff
path: root/Build/source/libs/poppler/poppler-0.22.0-PATCHES/patch-02-warnings
blob: 7005780d152ee71c343c0466012771e63d234b2c (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
diff -ur poppler-0.22.0.orig/poppler/GfxState.cc poppler-0.22.0/poppler/GfxState.cc
--- poppler-0.22.0.orig/poppler/GfxState.cc	2012-12-29 19:10:14.000000000 +0100
+++ poppler-0.22.0/poppler/GfxState.cc	2012-12-31 18:31:11.556637007 +0100
@@ -3433,7 +3433,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.22.0.orig/poppler/GfxState.h poppler-0.22.0/poppler/GfxState.h
--- poppler-0.22.0.orig/poppler/GfxState.h	2012-12-28 01:17:05.000000000 +0100
+++ poppler-0.22.0/poppler/GfxState.h	2012-12-31 18:31:11.560620942 +0100
@@ -101,7 +101,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.22.0.orig/poppler/Hints.cc poppler-0.22.0/poppler/Hints.cc
--- poppler-0.22.0.orig/poppler/Hints.cc	2012-12-28 01:17:03.000000000 +0100
+++ poppler-0.22.0/poppler/Hints.cc	2012-12-31 18:31:11.560620942 +0100
@@ -415,7 +415,7 @@
 {
   Guint bit, bits;
 
-  if (n < 0) return -1;
+  if (n < 0) return (Guint)-1;
   if (n == 0) return 0;
 
   if (n == 1)
@@ -423,11 +423,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.22.0.orig/poppler/Lexer.cc poppler-0.22.0/poppler/Lexer.cc
--- poppler-0.22.0.orig/poppler/Lexer.cc	2012-12-28 01:17:03.000000000 +0100
+++ poppler-0.22.0/poppler/Lexer.cc	2012-12-31 18:31:11.560620942 +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.22.0.orig/poppler/Stream.cc poppler-0.22.0/poppler/Stream.cc
--- poppler-0.22.0.orig/poppler/Stream.cc	2012-12-28 01:17:03.000000000 +0100
+++ poppler-0.22.0/poppler/Stream.cc	2012-12-31 18:31:11.560620942 +0100
@@ -480,7 +480,7 @@
   Guchar *p;
  
   int readChars = str->doGetChars(inputLineSize, inputLine);
-  for ( ; readChars < inputLineSize; readChars++) inputLine[readChars] = EOF;
+  for ( ; readChars < inputLineSize; readChars++) inputLine[readChars] = (Guchar)EOF;
   if (nBits == 1) {
     p = inputLine;
     for (i = 0; i < nVals; i += 8) {